| Index: content/browser/frame_host/render_frame_host_manager.h
|
| diff --git a/content/browser/frame_host/render_frame_host_manager.h b/content/browser/frame_host/render_frame_host_manager.h
|
| index fddfd9c8de20f9fb2a815d40584b8d0cbfc21ee9..a2f4db4e058f34db9d4a85febdd3ffa44671f21d 100644
|
| --- a/content/browser/frame_host/render_frame_host_manager.h
|
| +++ b/content/browser/frame_host/render_frame_host_manager.h
|
| @@ -18,6 +18,7 @@
|
| #include "content/public/common/referrer.h"
|
|
|
| struct FrameHostMsg_BeginNavigation_Params;
|
| +struct FrameMsg_Navigate_Params;
|
|
|
| namespace content {
|
| class BrowserContext;
|
| @@ -40,6 +41,7 @@ class RenderWidgetHostDelegate;
|
| class RenderWidgetHostView;
|
| class TestWebContents;
|
| class WebUIImpl;
|
| +struct NavigationCommitInfo;
|
|
|
| // Manages RenderFrameHosts for a FrameTreeNode. This class acts as a state
|
| // machine to make cross-process navigations in a frame possible.
|
| @@ -187,6 +189,13 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
|
| // could not be created.
|
| RenderFrameHostImpl* Navigate(const NavigationEntryImpl& entry);
|
|
|
| + // As part of the PlzNavigate refactoring project, sends a RequestNavigation
|
| + // IPC to the renderer to ask it to navigate. If no live renderer is present,
|
| + // then the navigation request will be sent directly to the
|
| + // ResourceDispatcherHost.
|
| + bool RequestNavigation(const NavigationEntryImpl& entry,
|
| + const FrameMsg_Navigate_Params& navigate_params);
|
| +
|
| // Instructs the various live views to stop. Called when the user directed the
|
| // page to stop loading.
|
| void Stop();
|
| @@ -246,12 +255,15 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
|
|
|
| // Helper method to create and initialize a RenderFrameHost. If |swapped_out|
|
| // is true, it will be initially placed on the swapped out hosts list.
|
| + // Else if |is_speculative| is true, then it will used as a speculatively
|
| + // spawned renderer in the PlzNavigate navigation refactoring project.
|
| // Otherwise, it will be used for a pending cross-site navigation.
|
| // Returns the routing id of the *view* associated with the frame.
|
| int CreateRenderFrame(SiteInstance* instance,
|
| int opener_route_id,
|
| bool swapped_out,
|
| - bool hidden);
|
| + bool hidden,
|
| + bool is_speculative);
|
|
|
| // Sets the passed passed interstitial as the currently showing interstitial.
|
| // |interstitial_page| should be non NULL (use the remove_interstitial_page
|
| @@ -305,6 +317,10 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
|
| // Used to start a navigation, part of browser-side navigation project.
|
| void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params);
|
|
|
| + // Used to signal the commit of a navigation request, part of PlzNavigate
|
| + // navigation refactoring project.
|
| + void CommitNavigation(const NavigationCommitInfo& info);
|
| +
|
| private:
|
| friend class RenderFrameHostManagerTest;
|
| friend class TestWebContents;
|
| @@ -394,6 +410,16 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
|
| SiteInstance* current_instance,
|
| bool force_browsing_instance_swap);
|
|
|
| + // Creates a new RenderFrameHostImpl for the |new_instance| while respecting
|
| + // the opener route if needed. If |is_speculative| is true, then the newly
|
| + // created RFH will be stored in speculative_render_frame_host_, otherwise it
|
| + // will be stored in pending_render_frame_host_. Also returns a pointer to the
|
| + // newly created RFH.
|
| + RenderFrameHostImpl* CreateRenderFrameHostForCrossSite(
|
| + SiteInstance* old_instance,
|
| + SiteInstance* new_instance,
|
| + bool is_speculative);
|
| +
|
| // Creates a RenderFrameHost and corresponding RenderViewHost if necessary.
|
| scoped_ptr<RenderFrameHostImpl> CreateRenderFrameHost(SiteInstance* instance,
|
| int view_routing_id,
|
| @@ -413,6 +439,14 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
|
| int proxy_routing_id,
|
| bool for_main_frame);
|
|
|
| + // Initializes |dest_render_frame_host| and |render_frame_host_| if necessary
|
| + // before navigating.
|
| + bool InitRenderFrameHostsBeforeNavigation(
|
| + RenderFrameHostImpl* dest_render_frame_host);
|
| +
|
| + // Returns the SiteInstance to use for the navigation.
|
| + SiteInstance* GetSiteInstanceForNavigation(const NavigationEntryImpl& entry);
|
| +
|
| // Sets the pending RenderFrameHost/WebUI to be the active one. Note that this
|
| // doesn't require the pending render_frame_host_ pointer to be non-NULL,
|
| // since there could be Web UI switching as well. Call this for every commit.
|
| @@ -482,6 +516,11 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver {
|
| // headers.
|
| scoped_ptr<GlobalRequestID> response_started_id_;
|
|
|
| + // A RenderFrameHost speculatively created when receiving a navigation
|
| + // request. It should be used or deleted when the current navigation request
|
| + // commits.
|
| + scoped_ptr<RenderFrameHostImpl> speculative_render_frame_host_;
|
| +
|
| // If either of these is non-NULL, the pending navigation is to a chrome:
|
| // page. The scoped_ptr is used if pending_web_ui_ != web_ui_, the WeakPtr is
|
| // used for when they reference the same object. If either is non-NULL, the
|
|
|