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_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "content/browser/site_instance_impl.h" | 13 #include "content/browser/site_instance_impl.h" |
14 #include "ipc/ipc_listener.h" | 14 #include "ipc/ipc_listener.h" |
15 #include "ipc/ipc_sender.h" | 15 #include "ipc/ipc_sender.h" |
16 #include "third_party/WebKit/public/platform/WebFocusType.h" | 16 #include "third_party/WebKit/public/platform/WebFocusType.h" |
17 | 17 |
18 struct FrameHostMsg_OpenURL_Params; | 18 struct FrameHostMsg_OpenURL_Params; |
19 struct FrameMsg_PostMessage_Params; | 19 struct FrameMsg_PostMessage_Params; |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 class CrossProcessFrameConnector; | 23 class CrossProcessFrameConnector; |
24 class FrameTreeNode; | 24 class FrameTreeNode; |
25 class RenderProcessHost; | 25 class RenderProcessHost; |
26 class RenderFrameHostImpl; | 26 class RenderFrameHostImpl; |
27 class RenderViewHostImpl; | 27 class RenderViewHostImpl; |
28 class RenderWidgetHostView; | 28 class RenderWidgetHostView; |
| 29 struct ContentSecurityPolicyViolation; |
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 (i.e., RenderFrameProxies) | 33 // responsible for rendering and placeholder objects (i.e., RenderFrameProxies) |
33 // for frames rendered by other processes. | 34 // for frames rendered by other processes. |
34 // | 35 // |
35 // This class is the browser-side host object for the placeholder. Each node in | 36 // This class is the browser-side host object for the placeholder. Each node in |
36 // the frame tree has a RenderFrameHost for the active SiteInstance and a set | 37 // the frame tree has a RenderFrameHost for the active SiteInstance and a set |
37 // of RenderFrameProxyHost objects - one for all other SiteInstances with | 38 // of RenderFrameProxyHost objects - one for all other SiteInstances with |
38 // references to this frame. The proxies allow us to keep existing window | 39 // references to this frame. The proxies allow us to keep existing window |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 render_frame_proxy_created_ = created; | 113 render_frame_proxy_created_ = created; |
113 } | 114 } |
114 | 115 |
115 // Returns if the RenderFrameProxy for this host is alive. | 116 // Returns if the RenderFrameProxy for this host is alive. |
116 bool is_render_frame_proxy_live() { return render_frame_proxy_created_; } | 117 bool is_render_frame_proxy_live() { return render_frame_proxy_created_; } |
117 | 118 |
118 private: | 119 private: |
119 // IPC Message handlers. | 120 // IPC Message handlers. |
120 void OnDetach(); | 121 void OnDetach(); |
121 void OnOpenURL(const FrameHostMsg_OpenURL_Params& params); | 122 void OnOpenURL(const FrameHostMsg_OpenURL_Params& params); |
| 123 void OnForwardContentSecurityPolicyViolation( |
| 124 const ContentSecurityPolicyViolation& violation); |
122 void OnRouteMessageEvent(const FrameMsg_PostMessage_Params& params); | 125 void OnRouteMessageEvent(const FrameMsg_PostMessage_Params& params); |
123 void OnDidChangeOpener(int32_t opener_routing_id); | 126 void OnDidChangeOpener(int32_t opener_routing_id); |
124 void OnAdvanceFocus(blink::WebFocusType type, int32_t source_routing_id); | 127 void OnAdvanceFocus(blink::WebFocusType type, int32_t source_routing_id); |
125 void OnFrameFocused(); | 128 void OnFrameFocused(); |
126 | 129 |
127 // This RenderFrameProxyHost's routing id. | 130 // This RenderFrameProxyHost's routing id. |
128 int routing_id_; | 131 int routing_id_; |
129 | 132 |
130 // The SiteInstance this proxy is associated with. | 133 // The SiteInstance this proxy is associated with. |
131 scoped_refptr<SiteInstance> site_instance_; | 134 scoped_refptr<SiteInstance> site_instance_; |
(...skipping 20 matching lines...) Expand all Loading... |
152 // kept alive as long as any RenderFrameHosts or RenderFrameProxyHosts | 155 // kept alive as long as any RenderFrameHosts or RenderFrameProxyHosts |
153 // are associated with it. | 156 // are associated with it. |
154 RenderViewHostImpl* render_view_host_; | 157 RenderViewHostImpl* render_view_host_; |
155 | 158 |
156 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); | 159 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); |
157 }; | 160 }; |
158 | 161 |
159 } // namespace | 162 } // namespace |
160 | 163 |
161 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ | 164 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ |
OLD | NEW |