1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_
8 #include "content/public/browser/invalidate_type.h"
9 #include "content/public/browser/navigation_controller.h"
13 class RenderFrameHost;
15 // A delegate API used by Navigator to notify its embedder of navigation
17 class NavigatorDelegate {
19 // The RenderFrameHost started a provisional load for the frame
20 // represented by |render_frame_host|.
21 virtual void DidStartProvisionalLoad(
22 RenderFrameHostImpl* render_frame_host,
24 int64 parent_frame_id,
26 const GURL& validated_url,
28 bool is_iframe_srcdoc) {}
30 // A provisional load in |render_frame_host| failed.
31 virtual void DidFailProvisionalLoadWithError(
32 RenderFrameHostImpl* render_frame_host,
33 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {}
35 // A redirect was processed in |render_frame_host| during a provisional load.
36 virtual void DidRedirectProvisionalLoad(
37 RenderFrameHostImpl* render_frame_host,
38 const GURL& validated_target_url) {}
40 // Notification to the Navigator embedder that navigation state has
41 // changed. This method corresponds to
42 // WebContents::NotifyNavigationStateChanged.
43 virtual void NotifyChangedNavigationState(InvalidateTypes changed_flags) {}
45 // Notifies the Navigator embedder that it is beginning to navigate a frame.
46 virtual void AboutToNavigateRenderFrame(
47 RenderFrameHostImpl* render_frame_host) {}
49 // Notifies the Navigator embedder that a navigation to pending
50 // NavigationEntry has started in the browser process.
51 virtual void DidStartNavigationToPendingEntry(
52 RenderFrameHostImpl* render_frame_host,
54 NavigationController::ReloadType reload_type) {}
59 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_