| Index: content/browser/renderer_host/render_view_host_impl.h
|
| diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
|
| index a3401c34afbd282b8a45ed5bebb53c90d0ca7d19..4e068ed2d1223b42c96ad5e37baf26144ba1013b 100644
|
| --- a/content/browser/renderer_host/render_view_host_impl.h
|
| +++ b/content/browser/renderer_host/render_view_host_impl.h
|
| @@ -21,6 +21,7 @@
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/render_view_host.h"
|
| #include "content/public/common/javascript_message_type.h"
|
| +#include "content/public/common/page_transition_types.h"
|
| #include "content/public/common/window_container_type.h"
|
| #include "net/base/load_states.h"
|
| #include "third_party/WebKit/public/web/WebAXEnums.h"
|
| @@ -60,7 +61,6 @@ namespace content {
|
| class BrowserMediaPlayerManager;
|
| class ChildProcessSecurityPolicyImpl;
|
| class PageState;
|
| -class RenderFrameHostImpl;
|
| class RenderWidgetHostDelegate;
|
| class SessionStorageNamespace;
|
| class SessionStorageNamespaceImpl;
|
| @@ -226,6 +226,12 @@ class CONTENT_EXPORT RenderViewHostImpl
|
| delegate_ = d;
|
| }
|
|
|
| + // Map renderer-specific frame IDs to browser-global FrameTreeNode IDs.
|
| + // TODO(creis): Unregister as well. Think about where this map belongs.
|
| + void RegisterFrameTreeNodeID(int64 frame_id, int64 frame_tree_node_id);
|
| + bool HasFrameTreeNodeID(int64 frame_id) const;
|
| + int64 GetFrameTreeNodeID(int64 frame_id);
|
| +
|
| // Set up the RenderView child process. Virtual because it is overridden by
|
| // TestRenderViewHost. If the |frame_name| parameter is non-empty, it is used
|
| // as the name of the new top-level frame.
|
| @@ -290,6 +296,19 @@ class CONTENT_EXPORT RenderViewHostImpl
|
| // different process.
|
| bool is_swapped_out() const { return is_swapped_out_; }
|
|
|
| + // Called on the pending RenderViewHost when the network response is ready to
|
| + // commit. We should ensure that the old RenderViewHost runs its unload
|
| + // handler and determine whether a transfer to a different RenderViewHost is
|
| + // needed.
|
| + // TODO(creis): This should happen on RenderFrameHost.
|
| + void OnCrossSiteResponse(
|
| + const GlobalRequestID& global_request_id,
|
| + bool is_transfer,
|
| + const std::vector<GURL>& transfer_url_chain,
|
| + const Referrer& referrer,
|
| + PageTransition page_transition,
|
| + int64 frame_id);
|
| +
|
| // Tells the renderer that this RenderView is being swapped out for one in a
|
| // different renderer process. It should run its unload handler and move to
|
| // a blank document. The renderer should preserve the Frame object until it
|
| @@ -409,10 +428,6 @@ class CONTENT_EXPORT RenderViewHostImpl
|
| is_subframe_ = is_subframe;
|
| }
|
|
|
| - int64 main_frame_id() const {
|
| - return main_frame_id_;
|
| - }
|
| -
|
| // Set the opener to null in the renderer process.
|
| void DisownOpener();
|
|
|
| @@ -460,13 +475,6 @@ class CONTENT_EXPORT RenderViewHostImpl
|
| bool empty_allowed,
|
| GURL* url);
|
|
|
| - // Update the FrameTree to use this RenderViewHost's main frame
|
| - // RenderFrameHost. Called when the RenderViewHost is committed.
|
| - //
|
| - // TODO(ajwong): Remove once RenderViewHost no longer owns the main frame
|
| - // RenderFrameHost.
|
| - void AttachToFrameTree();
|
| -
|
| // The following IPC handlers are public so RenderFrameHost can call them,
|
| // while we transition the code to not use RenderViewHost.
|
| //
|
| @@ -590,33 +598,19 @@ class CONTENT_EXPORT RenderViewHostImpl
|
| void OnShowPopup(const ViewHostMsg_ShowPopup_Params& params);
|
| #endif
|
|
|
| - // TODO(nasko): Remove this accessor once RenderFrameHost moves into the frame
|
| - // tree.
|
| - RenderFrameHostImpl* main_render_frame_host() const {
|
| - return main_render_frame_host_.get();
|
| - }
|
| -
|
| private:
|
| friend class TestRenderViewHost;
|
| FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, BasicRenderFrameHost);
|
| FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, RoutingIdSane);
|
|
|
| + typedef base::hash_map<int64, int64> FrameIDMap;
|
| +
|
| // Sets whether this RenderViewHost is swapped out in favor of another,
|
| // and clears any waiting state that is no longer relevant.
|
| void SetSwappedOut(bool is_swapped_out);
|
|
|
| bool CanAccessFilesOfPageState(const PageState& state) const;
|
|
|
| - // All RenderViewHosts must have a RenderFrameHost for its main frame.
|
| - // Currently the RenderFrameHost is created in lock step on construction
|
| - // and a pointer to the main frame is given to the FrameTreeNode
|
| - // when the RenderViewHost commits (see AttachToFrameTree()).
|
| - //
|
| - // TODO(ajwong): Make this reference non-owning. The root FrameTreeNode of
|
| - // the FrameTree should be responsible for owning the main frame's
|
| - // RenderFrameHost.
|
| - scoped_ptr<RenderFrameHostImpl> main_render_frame_host_;
|
| -
|
| // Our delegate, which wants to know about changes in the RenderView.
|
| RenderViewHostDelegate* delegate_;
|
|
|
| @@ -625,6 +619,9 @@ class CONTENT_EXPORT RenderViewHostImpl
|
| // over time.
|
| scoped_refptr<SiteInstanceImpl> instance_;
|
|
|
| + // Map of renderer-specific frame IDs to browser-global FrameTreeNode IDs.
|
| + FrameIDMap frame_id_map_;
|
| +
|
| // true if we are currently waiting for a response for drag context
|
| // information.
|
| bool waiting_for_drag_context_response_;
|
| @@ -659,10 +656,9 @@ class CONTENT_EXPORT RenderViewHostImpl
|
| // different process from its parent page.
|
| bool is_subframe_;
|
|
|
| - // The frame id of the main (top level) frame. This value is set on the
|
| - // initial navigation of a RenderView and reset when the RenderView's
|
| - // process is terminated (in RenderProcessGone).
|
| - int64 main_frame_id_;
|
| + // Routing ID for the main frame's RenderFrameHost.
|
| + // TODO(creis): Does this need to be updated on a crash?
|
| + int main_frame_routing_id_;
|
|
|
| // If we were asked to RunModal, then this will hold the reply_msg that we
|
| // must return to the renderer to unblock it.
|
|
|