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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "content/browser/frame_host/render_frame_host_impl.h" | 9 #include "content/browser/frame_host/render_frame_host_impl.h" |
10 #include "content/browser/site_instance_impl.h" | 10 #include "content/browser/site_instance_impl.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 | 13 |
| 14 struct FrameMsg_PostMessage_Params; |
| 15 |
14 namespace content { | 16 namespace content { |
15 | 17 |
16 class CrossProcessFrameConnector; | 18 class CrossProcessFrameConnector; |
17 class FrameTreeNode; | 19 class FrameTreeNode; |
18 class RenderProcessHost; | 20 class RenderProcessHost; |
19 class RenderFrameHostImpl; | 21 class RenderFrameHostImpl; |
20 class RenderViewHostImpl; | 22 class RenderViewHostImpl; |
21 class RenderWidgetHostView; | 23 class RenderWidgetHostView; |
22 | 24 |
23 // When a page's frames are rendered by multiple processes, each renderer has a | 25 // When a page's frames are rendered by multiple processes, each renderer has a |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 void set_render_frame_proxy_created(bool created) { | 111 void set_render_frame_proxy_created(bool created) { |
110 render_frame_proxy_created_ = created; | 112 render_frame_proxy_created_ = created; |
111 } | 113 } |
112 | 114 |
113 // Returns if the RenderFrameProxy for this host is alive. | 115 // Returns if the RenderFrameProxy for this host is alive. |
114 bool is_render_frame_proxy_live() { return render_frame_proxy_created_; } | 116 bool is_render_frame_proxy_live() { return render_frame_proxy_created_; } |
115 | 117 |
116 private: | 118 private: |
117 // IPC Message handlers. | 119 // IPC Message handlers. |
118 void OnOpenURL(const FrameHostMsg_OpenURL_Params& params); | 120 void OnOpenURL(const FrameHostMsg_OpenURL_Params& params); |
| 121 void OnRouteMessageEvent(const FrameMsg_PostMessage_Params& params); |
119 | 122 |
120 // This RenderFrameProxyHost's routing id. | 123 // This RenderFrameProxyHost's routing id. |
121 int routing_id_; | 124 int routing_id_; |
122 | 125 |
123 // The SiteInstance this proxy is associated with. | 126 // The SiteInstance this proxy is associated with. |
124 scoped_refptr<SiteInstance> site_instance_; | 127 scoped_refptr<SiteInstance> site_instance_; |
125 | 128 |
126 // The renderer process this RenderFrameHostProxy is associated with. It is | 129 // The renderer process this RenderFrameHostProxy is associated with. It is |
127 // equivalent to the result of site_instance_->GetProcess(), but that | 130 // equivalent to the result of site_instance_->GetProcess(), but that |
128 // method has the side effect of creating the process if it doesn't exist. | 131 // method has the side effect of creating the process if it doesn't exist. |
(...skipping 15 matching lines...) Expand all Loading... |
144 // TODO(nasko): This can be removed once we don't have a swapped out state on | 147 // TODO(nasko): This can be removed once we don't have a swapped out state on |
145 // RenderFrameHosts. See https://crbug.com/357747. | 148 // RenderFrameHosts. See https://crbug.com/357747. |
146 scoped_ptr<RenderFrameHostImpl> render_frame_host_; | 149 scoped_ptr<RenderFrameHostImpl> render_frame_host_; |
147 | 150 |
148 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); | 151 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); |
149 }; | 152 }; |
150 | 153 |
151 } // namespace | 154 } // namespace |
152 | 155 |
153 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ | 156 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ |
OLD | NEW |