| Index: content/browser/frame_host/render_frame_host_impl.h
|
| diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
|
| index dbe8972e2ac3a120d554c8a24fde378d49be2942..4819c520563db7d7ef2cfea2c100ac1d02768710 100644
|
| --- a/content/browser/frame_host/render_frame_host_impl.h
|
| +++ b/content/browser/frame_host/render_frame_host_impl.h
|
| @@ -15,6 +15,7 @@ class GURL;
|
| namespace content {
|
|
|
| class FrameTree;
|
| +class FrameTreeNode;
|
| class RenderProcessHost;
|
| class RenderViewHostImpl;
|
|
|
| @@ -27,6 +28,7 @@ class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost {
|
| // into WebContentsObserver::FrameDetached for now.
|
| RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
|
| FrameTree* frame_tree,
|
| + FrameTreeNode* frame_tree_node,
|
| int routing_id,
|
| bool is_swapped_out);
|
| virtual ~RenderFrameHostImpl();
|
| @@ -49,6 +51,18 @@ class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost {
|
| return render_view_host_;
|
| }
|
|
|
| + // TODO(creis): Think about where this API belongs.
|
| + bool is_main_frame() const;
|
| +
|
| + // Hack to get this subframe to swap out, without yet moving over all the
|
| + // state and machinery from RenderViewHost.
|
| + void SwapOut();
|
| + void OnSwappedOut(bool timed_out);
|
| + bool is_swapped_out() { return is_swapped_out_; }
|
| + void set_swapped_out(bool is_swapped_out) {
|
| + is_swapped_out_ = is_swapped_out;
|
| + }
|
| +
|
| private:
|
| // IPC Message handlers.
|
| void OnDetach(int64 parent_frame_id, int64 frame_id);
|
| @@ -56,16 +70,21 @@ class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost {
|
| int64 parent_frame_id,
|
| bool main_frame,
|
| const GURL& url);
|
| + void OnSwapOutACK();
|
|
|
| - bool is_swapped_out() { return is_swapped_out_; }
|
| -
|
| - // TODO(nasko): This should be removed and replaced by RenderProcessHost.
|
| - RenderViewHostImpl* render_view_host_; // Not owned.
|
| + // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via the
|
| + // refcount on FrameTree. This allows each RenderFrameHostManager to just
|
| + // care about RenderFrameHosts, while ensuring we have a RenderViewHost for
|
| + // each RenderFrameHost.
|
| + // TODO(creis): RenderViewHost will eventually go away and be replaced with
|
| + // some form of page context.
|
| + RenderViewHostImpl* render_view_host_;
|
|
|
| // Reference to the whole frame tree that this RenderFrameHost belongs too.
|
| // Allows this RenderFrameHost to add and remove nodes in response to
|
| // messages from the renderer requesting DOM manipulation.
|
| FrameTree* frame_tree_;
|
| + FrameTreeNode* frame_tree_node_;
|
| int routing_id_;
|
| bool is_swapped_out_;
|
|
|
|
|