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 c40cac4db9e694ea8fe43b6cb7bbe78ca7336497..e2d3093872f81af4e661c355395932e4b7cbb29d 100644 |
--- a/content/browser/frame_host/render_frame_host_manager.h |
+++ b/content/browser/frame_host/render_frame_host_manager.h |
@@ -26,14 +26,13 @@ namespace content { |
class BrowserContext; |
class CrossProcessFrameConnector; |
class CrossSiteTransferringRequest; |
-class InterstitialPageImpl; |
class FrameTreeNode; |
+class InterstitialPageImpl; |
class NavigationControllerImpl; |
class NavigationEntry; |
class NavigationEntryImpl; |
class RenderFrameHost; |
class RenderFrameHostDelegate; |
-class RenderFrameHost; |
class RenderFrameHostImpl; |
class RenderFrameHostManagerTest; |
class RenderFrameProxyHost; |
@@ -297,11 +296,16 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { |
// Called when a renderer sets its opener to null. |
void DidDisownOpener(RenderFrameHost* render_frame_host); |
- // Helper method to create and initialize a RenderFrameHost. If |flags| |
- // has the CREATE_RF_SWAPPED_OUT bit set from the CreateRenderFrameFlags |
- // enum, it will initially be placed on the swapped out hosts list. |
- // Returns the routing id of the *view* associated with the frame. |
- int CreateRenderFrame(SiteInstance* instance, int opener_route_id, int flags); |
+ // Creates and initializes a RenderFrameHost. If |flags| has the |
+ // CREATE_RF_SWAPPED_OUT bit set from the CreateRenderFrameFlags enum, it will |
+ // initially be placed on the swapped out hosts list. If |routing_id_ptr| is |
+ // not NULL it will be set to the routing id of the *view* associated with the |
nasko
2014/11/24 17:00:28
nit: null or nullptr
carlosk
2014/11/24 18:15:30
Done.
|
+ // frame. |
+ scoped_ptr<RenderFrameHostImpl> CreateRenderFrame(SiteInstance* instance, |
+ int opener_route_id, |
+ int flags, |
+ const WebUIImpl* web_ui, |
+ int* routing_id_ptr); |
// Helper method to create and initialize a RenderFrameProxyHost and return |
// its routing id. |
@@ -401,6 +405,10 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { |
const GURL& new_effective_url, |
bool new_is_view_source_mode) const; |
+ // Creates a new Web UI, ensuring that the bindings are appropriate compared |
+ // to |bindings|. The caller is responsible for the instance ownership. |
+ WebUIImpl* CreateWebUI(const GURL& url, int bindings); |
+ |
// Returns true if it is safe to reuse the current WebUI when navigating from |
// |current_entry| to |new_url|. |
bool ShouldReuseWebUI( |
@@ -442,6 +450,13 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { |
SiteInstance* new_instance, |
bool is_main_frame); |
+ // Ensure that we have created RFHs for the new RFH's opener chain if |
+ // we are staying in the same BrowsingInstance. This allows the new RFH |
+ // to send cross-process script calls to its opener(s). Returns the opener |
+ // route ID to be used for the new RenderView to be created. |
+ int CreateOpenerRenderViewsIfNeeded(SiteInstance* old_instance, |
+ SiteInstance* new_instance); |
+ |
// Creates a RenderFrameHost and corresponding RenderViewHost if necessary. |
scoped_ptr<RenderFrameHostImpl> CreateRenderFrameHost(SiteInstance* instance, |
int view_routing_id, |
@@ -474,6 +489,11 @@ class CONTENT_EXPORT RenderFrameHostManager : public NotificationObserver { |
// deleted or put on the pending delete list during this call. |
void SwapOutOldFrame(scoped_ptr<RenderFrameHostImpl> old_render_frame_host); |
+ // Discards a RenderFrameHost that was never made active (for active ones |
+ // SwapOutOldFrame is used instead). |
+ void DiscardRenderFrameHost( |
+ scoped_ptr<RenderFrameHostImpl> render_frame_host); |
+ |
// Holds |render_frame_host| until it can be deleted when its swap out ACK |
// arrives. |
void MoveToPendingDeleteHosts( |