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

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

Issue 483773002: PlzNavigate: implement CommitNavigation on the browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + fix compilation error Created 6 years, 2 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_RENDER_FRAME_HOST_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 25 matching lines...) Expand all
36 class RenderFrameHost; 36 class RenderFrameHost;
37 class RenderFrameHostImpl; 37 class RenderFrameHostImpl;
38 class RenderFrameHostManagerTest; 38 class RenderFrameHostManagerTest;
39 class RenderFrameProxyHost; 39 class RenderFrameProxyHost;
40 class RenderViewHost; 40 class RenderViewHost;
41 class RenderViewHostImpl; 41 class RenderViewHostImpl;
42 class RenderWidgetHostDelegate; 42 class RenderWidgetHostDelegate;
43 class RenderWidgetHostView; 43 class RenderWidgetHostView;
44 class TestWebContents; 44 class TestWebContents;
45 class WebUIImpl; 45 class WebUIImpl;
46 struct CommonNavigationParams;
46 struct NavigationBeforeCommitInfo; 47 struct NavigationBeforeCommitInfo;
48 struct RequestNavigationParams;
47 49
48 // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state 50 // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state
49 // machine to make cross-process navigations in a frame possible. 51 // machine to make cross-process navigations in a frame possible.
50 class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { 52 class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
51 public: 53 public:
52 // Functions implemented by our owner that we need. 54 // Functions implemented by our owner that we need.
53 // 55 //
54 // TODO(brettw) Clean this up! These are all the functions in WebContentsImpl 56 // TODO(brettw) Clean this up! These are all the functions in WebContentsImpl
55 // that are required to run this class. The design should probably be better 57 // that are required to run this class. The design should probably be better
56 // such that these are more clear. 58 // such that these are more clear.
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // of WebContentsImpl. 311 // of WebContentsImpl.
310 void ResetProxyHosts(); 312 void ResetProxyHosts();
311 313
312 // Returns the routing id for a RenderFrameHost or RenderFrameHostProxy 314 // Returns the routing id for a RenderFrameHost or RenderFrameHostProxy
313 // that has the given SiteInstance and is associated with this 315 // that has the given SiteInstance and is associated with this
314 // RenderFrameHostManager. Returns MSG_ROUTING_NONE if none is found. 316 // RenderFrameHostManager. Returns MSG_ROUTING_NONE if none is found.
315 int GetRoutingIdForSiteInstance(SiteInstance* site_instance); 317 int GetRoutingIdForSiteInstance(SiteInstance* site_instance);
316 318
317 // PlzNavigate: sends a RequestNavigation IPC to the renderer to ask it to 319 // PlzNavigate: sends a RequestNavigation IPC to the renderer to ask it to
318 // navigate. If no live renderer is present, then the navigation request will 320 // navigate. If no live renderer is present, then the navigation request will
319 // be sent directly to the ResourceDispatcherHost. 321 // be sent directly to the ResourceDispatcherHost. Takes ownership of
320 bool RequestNavigation(const NavigationEntryImpl& entry, 322 // |navigation_request|.
321 const FrameMsg_Navigate_Params& navigate_params); 323 bool RequestNavigation(scoped_ptr<NavigationRequest> navigation_request,
324 const RequestNavigationParams& request_params);
322 325
323 // PlzNavigate: Used to start a navigation. OnBeginNavigation is called 326 // PlzNavigate: Used to start a navigation. OnBeginNavigation is called
324 // directly by RequestNavigation when there is no live renderer. Otherwise, it 327 // directly by RequestNavigation when there is no live renderer. Otherwise, it
325 // is called following a BeginNavigation IPC from the renderer (which in 328 // is called following a BeginNavigation IPC from the renderer (which in
326 // browser-initiated navigation also happens after RequestNavigation has been 329 // browser-initiated navigation also happens after RequestNavigation has been
327 // called). 330 // called).
328 void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params); 331 void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params,
332 const CommonNavigationParams& common_params);
329 333
330 // PlzNavigate: Called when a navigation request has received a response, to 334 // PlzNavigate: Called when a navigation request has received a response, to
331 // select a renderer to use for the navigation. 335 // select a renderer to use for the navigation.
332 void CommitNavigation(const NavigationBeforeCommitInfo& info); 336 void CommitNavigation(const NavigationBeforeCommitInfo& info);
333 337
334 private: 338 private:
335 friend class RenderFrameHostManagerTest; 339 friend class RenderFrameHostManagerTest;
336 friend class TestWebContents; 340 friend class TestWebContents;
337 341
338 FRIEND_TEST_ALL_PREFIXES(CrossProcessFrameTreeBrowserTest, 342 FRIEND_TEST_ALL_PREFIXES(CrossProcessFrameTreeBrowserTest,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 scoped_ptr<NavigationRequest> navigation_request_; 541 scoped_ptr<NavigationRequest> navigation_request_;
538 542
539 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_; 543 base::WeakPtrFactory<RenderFrameHostManager> weak_factory_;
540 544
541 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager); 545 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostManager);
542 }; 546 };
543 547
544 } // namespace content 548 } // namespace content
545 549
546 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_ 550 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/frame_host/render_frame_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698