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

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

Issue 379143002: PlzNavigate: implement RequestNavigation in the no live renderer case (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Charlie's comments Created 6 years, 4 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
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_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/browser/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
11 #include "ui/base/window_open_disposition.h" 11 #include "ui/base/window_open_disposition.h"
12 12
13 class GURL; 13 class GURL;
14 struct FrameHostMsg_BeginNavigation_Params;
14 struct FrameHostMsg_DidCommitProvisionalLoad_Params; 15 struct FrameHostMsg_DidCommitProvisionalLoad_Params;
15 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; 16 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params;
16 17
17 namespace base { 18 namespace base {
18 class TimeTicks; 19 class TimeTicks;
19 } 20 }
20 21
21 namespace content { 22 namespace content {
22 23
23 class NavigationControllerImpl; 24 class NavigationControllerImpl;
24 class NavigationEntryImpl; 25 class NavigationEntryImpl;
25 class NavigatorDelegate; 26 class NavigatorDelegate;
26 class RenderFrameHostImpl; 27 class RenderFrameHostImpl;
28 struct NavigationBeforeCommitInfo;
27 29
28 // Implementations of this interface are responsible for performing navigations 30 // Implementations of this interface are responsible for performing navigations
29 // in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode 31 // in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode
30 // objects that are using it and will be released once all nodes that use it are 32 // objects that are using it and will be released once all nodes that use it are
31 // freed. The Navigator is bound to a single frame tree and cannot be used by 33 // freed. The Navigator is bound to a single frame tree and cannot be used by
32 // multiple instances of FrameTree. 34 // multiple instances of FrameTree.
33 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad 35 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad
34 // from WebContentsImpl to this interface. 36 // from WebContentsImpl to this interface.
35 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { 37 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> {
36 public: 38 public:
37 // Returns the NavigationController associated with this Navigator. 39 // Returns the NavigationController associated with this Navigator.
38 virtual NavigationController* GetController(); 40 virtual NavigationController* GetController();
39 41
40
41 // Notifications coming from the RenderFrameHosts ---------------------------- 42 // Notifications coming from the RenderFrameHosts ----------------------------
42 43
43 // The RenderFrameHostImpl started a provisional load. 44 // The RenderFrameHostImpl started a provisional load.
44 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, 45 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host,
45 const GURL& url, 46 const GURL& url,
46 bool is_transition_navigation) {}; 47 bool is_transition_navigation) {};
47 48
48 // The RenderFrameHostImpl has failed a provisional load. 49 // The RenderFrameHostImpl has failed a provisional load.
49 virtual void DidFailProvisionalLoadWithError( 50 virtual void DidFailProvisionalLoadWithError(
50 RenderFrameHostImpl* render_frame_host, 51 RenderFrameHostImpl* render_frame_host,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 RenderFrameHostImpl* render_frame_host, 113 RenderFrameHostImpl* render_frame_host,
113 const GURL& url, 114 const GURL& url,
114 const std::vector<GURL>& redirect_chain, 115 const std::vector<GURL>& redirect_chain,
115 const Referrer& referrer, 116 const Referrer& referrer,
116 PageTransition page_transition, 117 PageTransition page_transition,
117 WindowOpenDisposition disposition, 118 WindowOpenDisposition disposition,
118 const GlobalRequestID& transferred_global_request_id, 119 const GlobalRequestID& transferred_global_request_id,
119 bool should_replace_current_entry, 120 bool should_replace_current_entry,
120 bool user_gesture) {} 121 bool user_gesture) {}
121 122
123 // PlzNavigate
124 // Called after receiving a FrameHostMsg_BeginNavigation IPC from the
125 // renderer. Will create a NavigationEntry for the navigation and pass it to
126 // the RenderFrameHostManager, that will dispatch a NavigationRequest to the
127 // IO thread.
128 virtual void OnBeginNavigation(
129 RenderFrameHostImpl* render_frame_host,
130 const FrameHostMsg_BeginNavigation_Params& params) {};
131
132 // PlzNavigate
133 // Signal |render_frame_host| that a navigation is ready to commit (the
134 // response to the navigation request has been received).
135 virtual void CommitNavigation(RenderFrameHostImpl* render_frame_host,
136 const NavigationBeforeCommitInfo& info) {};
137
122 protected: 138 protected:
123 friend class base::RefCounted<Navigator>; 139 friend class base::RefCounted<Navigator>;
124 virtual ~Navigator() {} 140 virtual ~Navigator() {}
125 }; 141 };
126 142
127 } // namespace content 143 } // namespace content
128 144
129 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 145 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698