Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: content/browser/frame_host/navigator_delegate.h

Issue 135723003: Move DidCommitProvisionalLoad code from RenderView to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit tests and removed WebContents::DidNavigate Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_
7 7
8 #include "base/strings/string16.h"
8 #include "content/public/browser/invalidate_type.h" 9 #include "content/public/browser/invalidate_type.h"
9 #include "content/public/browser/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
11 #include "content/public/common/page_transition_types.h"
12
13 class GURL;
14 struct FrameHostMsg_DidCommitProvisionalLoad_Params;
15 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params;
10 16
11 namespace content { 17 namespace content {
12 18
13 class RenderFrameHost; 19 class RenderFrameHostImpl;
20 struct LoadCommittedDetails;
14 21
15 // A delegate API used by Navigator to notify its embedder of navigation 22 // A delegate API used by Navigator to notify its embedder of navigation
16 // related events. 23 // related events.
17 class NavigatorDelegate { 24 class CONTENT_EXPORT NavigatorDelegate {
18 public: 25 public:
19 // The RenderFrameHost started a provisional load for the frame 26 // The RenderFrameHost started a provisional load for the frame
20 // represented by |render_frame_host|. 27 // represented by |render_frame_host|.
21 virtual void DidStartProvisionalLoad( 28 virtual void DidStartProvisionalLoad(
22 RenderFrameHostImpl* render_frame_host, 29 RenderFrameHostImpl* render_frame_host,
23 int64 frame_id, 30 int64 frame_id,
24 int64 parent_frame_id, 31 int64 parent_frame_id,
25 bool is_main_frame, 32 bool is_main_frame,
26 const GURL& validated_url, 33 const GURL& validated_url,
27 bool is_error_page, 34 bool is_error_page,
28 bool is_iframe_srcdoc) {} 35 bool is_iframe_srcdoc) {}
29 36
30 // A provisional load in |render_frame_host| failed. 37 // A provisional load in |render_frame_host| failed.
31 virtual void DidFailProvisionalLoadWithError( 38 virtual void DidFailProvisionalLoadWithError(
32 RenderFrameHostImpl* render_frame_host, 39 RenderFrameHostImpl* render_frame_host,
33 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {} 40 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {}
34 41
35 // A redirect was processed in |render_frame_host| during a provisional load. 42 // A redirect was processed in |render_frame_host| during a provisional load.
36 virtual void DidRedirectProvisionalLoad( 43 virtual void DidRedirectProvisionalLoad(
37 RenderFrameHostImpl* render_frame_host, 44 RenderFrameHostImpl* render_frame_host,
38 const GURL& validated_target_url) {} 45 const GURL& validated_target_url) {}
39 46
47 // A navigation was committed in |render_frame_host|.
48 virtual void DidCommitProvisionalLoad(
49 int64 frame_id,
50 const base::string16& frame_unique_name,
51 bool is_main_frame,
52 const GURL& url,
53 PageTransition transition_type,
54 RenderFrameHostImpl* render_frame_host) {}
55
56 // Handles post-navigation tasks in navigation AFTER the entry has been
57 // committed to the NavigationController. Note that the NavigationEntry is
58 // not provided since it may be invalid/changed after being committed. The
59 // NavigationController last committed entry is for this navigation.
Charlie Reis 2014/02/06 21:49:07 nit: NavigationController's
nasko 2014/02/06 21:58:43 Done.
60 virtual void DidNavigateMainFramePostCommit(
61 const LoadCommittedDetails& details,
62 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) {}
63 virtual void DidNavigateAnyFramePostCommit(
64 RenderFrameHostImpl* render_frame_host,
65 const LoadCommittedDetails& details,
66 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) {}
67
68 virtual void SetMainFrameMimeType(const std::string& mime_type) {}
69 virtual bool CanOverscrollContent();
70
40 // Notification to the Navigator embedder that navigation state has 71 // Notification to the Navigator embedder that navigation state has
41 // changed. This method corresponds to 72 // changed. This method corresponds to
42 // WebContents::NotifyNavigationStateChanged. 73 // WebContents::NotifyNavigationStateChanged.
43 virtual void NotifyChangedNavigationState(InvalidateTypes changed_flags) {} 74 virtual void NotifyChangedNavigationState(InvalidateTypes changed_flags) {}
44 75
45 // Notifies the Navigator embedder that it is beginning to navigate a frame. 76 // Notifies the Navigator embedder that it is beginning to navigate a frame.
46 virtual void AboutToNavigateRenderFrame( 77 virtual void AboutToNavigateRenderFrame(
47 RenderFrameHostImpl* render_frame_host) {} 78 RenderFrameHostImpl* render_frame_host) {}
48 79
49 // Notifies the Navigator embedder that a navigation to pending 80 // Notifies the Navigator embedder that a navigation to pending
50 // NavigationEntry has started in the browser process. 81 // NavigationEntry has started in the browser process.
51 virtual void DidStartNavigationToPendingEntry( 82 virtual void DidStartNavigationToPendingEntry(
52 RenderFrameHostImpl* render_frame_host, 83 RenderFrameHostImpl* render_frame_host,
53 const GURL& url, 84 const GURL& url,
54 NavigationController::ReloadType reload_type) {} 85 NavigationController::ReloadType reload_type) {}
55 }; 86 };
56 87
57 } // namspace content 88 } // namspace content
58 89
59 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_ 90 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698