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

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

Issue 100473010: Adding RenderWidgetHostViewChildFrame for OOPIF view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment. also squished change locally. Created 7 years 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 | Annotate | Revision Log
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_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/public/browser/render_frame_host.h" 12 #include "content/public/browser/render_frame_host.h"
13 13
14 class GURL; 14 class GURL;
15 15
16 namespace base { 16 namespace base {
17 class FilePath; 17 class FilePath;
18 } 18 }
19 19
20 namespace content { 20 namespace content {
21 21
22 class CrossProcessFrameConnector;
22 class FrameTree; 23 class FrameTree;
23 class FrameTreeNode; 24 class FrameTreeNode;
24 class RenderFrameHostDelegate; 25 class RenderFrameHostDelegate;
25 class RenderProcessHost; 26 class RenderProcessHost;
26 class RenderViewHostImpl; 27 class RenderViewHostImpl;
27 28
28 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost { 29 class CONTENT_EXPORT RenderFrameHostImpl : public RenderFrameHost {
29 public: 30 public:
30 static RenderFrameHostImpl* FromID(int process_id, int routing_id); 31 static RenderFrameHostImpl* FromID(int process_id, int routing_id);
31 32
(...skipping 12 matching lines...) Expand all
44 void Init(); 45 void Init();
45 int routing_id() const { return routing_id_; } 46 int routing_id() const { return routing_id_; }
46 void OnCreateChildFrame(int new_frame_routing_id, 47 void OnCreateChildFrame(int new_frame_routing_id,
47 int64 parent_frame_id, 48 int64 parent_frame_id,
48 int64 frame_id, 49 int64 frame_id,
49 const std::string& frame_name); 50 const std::string& frame_name);
50 51
51 RenderViewHostImpl* render_view_host() { return render_view_host_; } 52 RenderViewHostImpl* render_view_host() { return render_view_host_; }
52 RenderFrameHostDelegate* delegate() { return delegate_; } 53 RenderFrameHostDelegate* delegate() { return delegate_; }
53 54
55 // This function is called when this is a swapped out RenderFrameHost that
Charlie Reis 2013/12/20 00:24:22 "when this is a swapped out RenderFrameHost:" That
56 // lives in the same process as the parent frame. The
57 // |cross_process_frame_connector| allows the non-swapped-out
Charlie Reis 2013/12/20 00:24:22 nit: non-swapped-out -> active
58 // RenderFrameHost for a frame to communicate with the parent process
59 // so that it may composite drawing data.
60 //
61 // Ownership is not transfered.
62 void set_cross_process_frame_connector(
63 CrossProcessFrameConnector* cross_process_frame_connector) {
64 cross_process_frame_connector_ = cross_process_frame_connector;
65 }
66
54 protected: 67 protected:
55 friend class RenderFrameHostFactory; 68 friend class RenderFrameHostFactory;
56 69
57 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost 70 // TODO(nasko): Remove dependency on RenderViewHost here. RenderProcessHost
58 // should be the abstraction needed here, but we need RenderViewHost to pass 71 // should be the abstraction needed here, but we need RenderViewHost to pass
59 // into WebContentsObserver::FrameDetached for now. 72 // into WebContentsObserver::FrameDetached for now.
60 RenderFrameHostImpl(RenderViewHostImpl* render_view_host, 73 RenderFrameHostImpl(RenderViewHostImpl* render_view_host,
61 RenderFrameHostDelegate* delegate, 74 RenderFrameHostDelegate* delegate,
62 FrameTree* frame_tree, 75 FrameTree* frame_tree,
63 FrameTreeNode* frame_tree_node, 76 FrameTreeNode* frame_tree_node,
(...skipping 15 matching lines...) Expand all
79 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a 92 // For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a
80 // refcount that calls Shutdown when it reaches zero. This allows each 93 // refcount that calls Shutdown when it reaches zero. This allows each
81 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring 94 // RenderFrameHostManager to just care about RenderFrameHosts, while ensuring
82 // we have a RenderViewHost for each RenderFrameHost. 95 // we have a RenderViewHost for each RenderFrameHost.
83 // TODO(creis): RenderViewHost will eventually go away and be replaced with 96 // TODO(creis): RenderViewHost will eventually go away and be replaced with
84 // some form of page context. 97 // some form of page context.
85 RenderViewHostImpl* render_view_host_; 98 RenderViewHostImpl* render_view_host_;
86 99
87 RenderFrameHostDelegate* delegate_; 100 RenderFrameHostDelegate* delegate_;
88 101
102 // |cross_process_frame_connector_| passes messages from an out-of-process
103 // child frame to the parent process for compositing.
104 //
105 // This is only non-NULL when this is the swapped out RenderFrameHost in
106 // the same site instance as this frame's parent.
Charlie Reis 2013/12/20 00:24:22 nit: SiteInstance
107 //
108 // See the class comment above CrossProcessFrameConnector for more
109 // information.
110 //
111 // This will move to RenderFrameProxyHost when that class is created.
112 CrossProcessFrameConnector* cross_process_frame_connector_;
113
89 // Reference to the whole frame tree that this RenderFrameHost belongs too. 114 // Reference to the whole frame tree that this RenderFrameHost belongs too.
90 // Allows this RenderFrameHost to add and remove nodes in response to 115 // Allows this RenderFrameHost to add and remove nodes in response to
91 // messages from the renderer requesting DOM manipulation. 116 // messages from the renderer requesting DOM manipulation.
92 FrameTree* frame_tree_; 117 FrameTree* frame_tree_;
93 118
94 // The FrameTreeNode which this RenderFrameHostImpl is hosted in. 119 // The FrameTreeNode which this RenderFrameHostImpl is hosted in.
95 FrameTreeNode* frame_tree_node_; 120 FrameTreeNode* frame_tree_node_;
96 121
97 int routing_id_; 122 int routing_id_;
98 bool is_swapped_out_; 123 bool is_swapped_out_;
99 124
100 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 125 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
101 }; 126 };
102 127
103 } // namespace content 128 } // namespace content
104 129
105 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 130 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698