OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERER_RENDER_FRAME_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ |
6 #define CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "ipc/ipc_listener.h" | 11 #include "ipc/ipc_listener.h" |
12 #include "ipc/ipc_sender.h" | 12 #include "ipc/ipc_sender.h" |
13 | |
14 #include "third_party/WebKit/public/web/WebRemoteFrame.h" | 13 #include "third_party/WebKit/public/web/WebRemoteFrame.h" |
15 #include "third_party/WebKit/public/web/WebRemoteFrameClient.h" | 14 #include "third_party/WebKit/public/web/WebRemoteFrameClient.h" |
15 #include "url/origin.h" | |
16 | 16 |
17 struct FrameMsg_BuffersSwapped_Params; | 17 struct FrameMsg_BuffersSwapped_Params; |
18 struct FrameMsg_CompositorFrameSwapped_Params; | 18 struct FrameMsg_CompositorFrameSwapped_Params; |
19 | 19 |
20 namespace blink { | 20 namespace blink { |
21 class WebInputEvent; | 21 class WebInputEvent; |
22 } | 22 } |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 | 25 |
26 class ChildFrameCompositingHelper; | 26 class ChildFrameCompositingHelper; |
27 class RenderFrameImpl; | 27 class RenderFrameImpl; |
28 class RenderViewImpl; | 28 class RenderViewImpl; |
29 struct FrameReplicationState; | |
29 | 30 |
30 // When a page's frames are rendered by multiple processes, each renderer has a | 31 // When a page's frames are rendered by multiple processes, each renderer has a |
31 // full copy of the frame tree. It has full RenderFrames for the frames it is | 32 // full copy of the frame tree. It has full RenderFrames for the frames it is |
32 // responsible for rendering and placeholder objects for frames rendered by | 33 // responsible for rendering and placeholder objects for frames rendered by |
33 // other processes. This class is the renderer-side object for the placeholder. | 34 // other processes. This class is the renderer-side object for the placeholder. |
34 // RenderFrameProxy allows us to keep existing window references valid over | 35 // RenderFrameProxy allows us to keep existing window references valid over |
35 // cross-process navigations and route cross-site asynchronous JavaScript calls, | 36 // cross-process navigations and route cross-site asynchronous JavaScript calls, |
36 // such as postMessage. | 37 // such as postMessage. |
37 // | 38 // |
38 // For now, RenderFrameProxy is created when RenderFrame is swapped out. It | 39 // For now, RenderFrameProxy is created when RenderFrame is swapped out. It |
(...skipping 30 matching lines...) Expand all Loading... | |
69 // newly created RenderFrameProxy. |parent_routing_id| is the routing ID of | 70 // newly created RenderFrameProxy. |parent_routing_id| is the routing ID of |
70 // the RenderFrameProxy to which the new frame is parented. | 71 // the RenderFrameProxy to which the new frame is parented. |
71 // |render_view_routing_id| identifies the RenderView to be associated with | 72 // |render_view_routing_id| identifies the RenderView to be associated with |
72 // this frame. | 73 // this frame. |
73 // | 74 // |
74 // |parent_routing_id| always identifies a RenderFrameProxy (never a | 75 // |parent_routing_id| always identifies a RenderFrameProxy (never a |
75 // RenderFrame) because a new child of a local frame should always start out | 76 // RenderFrame) because a new child of a local frame should always start out |
76 // as a frame, not a proxy. | 77 // as a frame, not a proxy. |
77 static RenderFrameProxy* CreateFrameProxy(int routing_id, | 78 static RenderFrameProxy* CreateFrameProxy(int routing_id, |
78 int parent_routing_id, | 79 int parent_routing_id, |
79 int render_view_routing_id); | 80 int render_view_routing_id, |
81 const FrameReplicationState&); | |
Charlie Reis
2014/11/13 18:00:58
Style: Needs a parameter name that matches the .cc
alexmos
2014/11/18 18:25:33
Done.
| |
80 | 82 |
81 // Returns the RenderFrameProxy for the given routing ID. | 83 // Returns the RenderFrameProxy for the given routing ID. |
82 static RenderFrameProxy* FromRoutingID(int routing_id); | 84 static RenderFrameProxy* FromRoutingID(int routing_id); |
83 | 85 |
84 // Returns the RenderFrameProxy given a WebFrame. | 86 // Returns the RenderFrameProxy given a WebFrame. |
85 static RenderFrameProxy* FromWebFrame(blink::WebFrame* web_frame); | 87 static RenderFrameProxy* FromWebFrame(blink::WebFrame* web_frame); |
86 | 88 |
87 ~RenderFrameProxy() override; | 89 ~RenderFrameProxy() override; |
88 | 90 |
89 // IPC::Sender | 91 // IPC::Sender |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
137 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; | 139 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; |
138 | 140 |
139 RenderViewImpl* render_view_; | 141 RenderViewImpl* render_view_; |
140 | 142 |
141 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxy); | 143 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxy); |
142 }; | 144 }; |
143 | 145 |
144 } // namespace | 146 } // namespace |
145 | 147 |
146 #endif // CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ | 148 #endif // CONTENT_RENDERER_RENDER_FRAME_PROXY_H_ |
OLD | NEW |