OLD | NEW |
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 <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 namespace content { | 46 namespace content { |
47 | 47 |
48 class CrossProcessFrameConnector; | 48 class CrossProcessFrameConnector; |
49 class CrossSiteTransferringRequest; | 49 class CrossSiteTransferringRequest; |
50 class FrameTree; | 50 class FrameTree; |
51 class FrameTreeNode; | 51 class FrameTreeNode; |
52 class RenderFrameHostDelegate; | 52 class RenderFrameHostDelegate; |
53 class RenderFrameProxyHost; | 53 class RenderFrameProxyHost; |
54 class RenderProcessHost; | 54 class RenderProcessHost; |
55 class RenderViewHostImpl; | 55 class RenderViewHostImpl; |
| 56 class RenderWidgetHostDelegate; |
56 class RenderWidgetHostImpl; | 57 class RenderWidgetHostImpl; |
57 class TimeoutMonitor; | 58 class TimeoutMonitor; |
58 struct ContextMenuParams; | 59 struct ContextMenuParams; |
59 struct GlobalRequestID; | 60 struct GlobalRequestID; |
60 struct Referrer; | 61 struct Referrer; |
61 struct ShowDesktopNotificationHostMsgParams; | 62 struct ShowDesktopNotificationHostMsgParams; |
62 struct TransitionLayerData; | 63 struct TransitionLayerData; |
63 | 64 |
64 class CONTENT_EXPORT RenderFrameHostImpl | 65 class CONTENT_EXPORT RenderFrameHostImpl |
65 : public RenderFrameHost, | 66 : public RenderFrameHost, |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // after they are blocked in RenderWidgetHelper::CreateNewWindow. | 161 // after they are blocked in RenderWidgetHelper::CreateNewWindow. |
161 void Init(); | 162 void Init(); |
162 | 163 |
163 int routing_id() const { return routing_id_; } | 164 int routing_id() const { return routing_id_; } |
164 void OnCreateChildFrame(int new_routing_id, | 165 void OnCreateChildFrame(int new_routing_id, |
165 const std::string& frame_name); | 166 const std::string& frame_name); |
166 | 167 |
167 RenderViewHostImpl* render_view_host() { return render_view_host_; } | 168 RenderViewHostImpl* render_view_host() { return render_view_host_; } |
168 RenderFrameHostDelegate* delegate() { return delegate_; } | 169 RenderFrameHostDelegate* delegate() { return delegate_; } |
169 FrameTreeNode* frame_tree_node() { return frame_tree_node_; } | 170 FrameTreeNode* frame_tree_node() { return frame_tree_node_; } |
170 // TODO(nasko): The RenderWidgetHost will be owned by RenderFrameHost in | 171 |
171 // the future, so update this accessor to return the right pointer. | 172 // This is called to create RenderWidgetHosts for out-of-process iframes. |
| 173 void CreateRenderWidgetHost(RenderWidgetHostDelegate* delegate, |
| 174 bool hidden); |
| 175 |
| 176 // This returns the RenderFrameHost's owned RenderWidgetHost if it has one, |
| 177 // or else it returns a pointer to the RenderViewHost (which inherits |
| 178 // RenderWidgetHost). |
172 RenderWidgetHostImpl* GetRenderWidgetHost(); | 179 RenderWidgetHostImpl* GetRenderWidgetHost(); |
173 | 180 |
174 // This function is called when this is a swapped out RenderFrameHost that | 181 // This function is called when this is a swapped out RenderFrameHost that |
175 // lives in the same process as the parent frame. The | 182 // lives in the same process as the parent frame. The |
176 // |cross_process_frame_connector| allows the non-swapped-out | 183 // |cross_process_frame_connector| allows the non-swapped-out |
177 // RenderFrameHost for a frame to communicate with the parent process | 184 // RenderFrameHost for a frame to communicate with the parent process |
178 // so that it may composite drawing data. | 185 // so that it may composite drawing data. |
179 // | 186 // |
180 // Ownership is not transfered. | 187 // Ownership is not transfered. |
181 void set_cross_process_frame_connector( | 188 void set_cross_process_frame_connector( |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 // The FrameTreeNode which this RenderFrameHostImpl is hosted in. | 492 // The FrameTreeNode which this RenderFrameHostImpl is hosted in. |
486 FrameTreeNode* frame_tree_node_; | 493 FrameTreeNode* frame_tree_node_; |
487 | 494 |
488 // The mapping of pending JavaScript calls created by | 495 // The mapping of pending JavaScript calls created by |
489 // ExecuteJavaScript and their corresponding callbacks. | 496 // ExecuteJavaScript and their corresponding callbacks. |
490 std::map<int, JavaScriptResultCallback> javascript_callbacks_; | 497 std::map<int, JavaScriptResultCallback> javascript_callbacks_; |
491 | 498 |
492 // Map from notification_id to a callback to cancel them. | 499 // Map from notification_id to a callback to cancel them. |
493 std::map<int, base::Closure> cancel_notification_callbacks_; | 500 std::map<int, base::Closure> cancel_notification_callbacks_; |
494 | 501 |
| 502 // RenderFrameHosts that need management of the rendering and input events |
| 503 // for their frame subtrees require RenderWidgetHosts. This typically |
| 504 // means frames that are rendered in different processes from their parent |
| 505 // frames. |
| 506 // TODO(kenrb): Later this will also be used on the top-level frame. |
| 507 scoped_ptr<RenderWidgetHostImpl> render_widget_host_; |
| 508 |
495 int routing_id_; | 509 int routing_id_; |
496 | 510 |
497 // The current state of this RenderFrameHost. | 511 // The current state of this RenderFrameHost. |
498 RenderFrameHostImplState rfh_state_; | 512 RenderFrameHostImplState rfh_state_; |
499 | 513 |
500 // Tracks whether the RenderFrame for this RenderFrameHost has been created in | 514 // Tracks whether the RenderFrame for this RenderFrameHost has been created in |
501 // the renderer process. Currently only used for subframes. | 515 // the renderer process. Currently only used for subframes. |
502 // TODO(creis): Use this for main frames as well when RVH goes away. | 516 // TODO(creis): Use this for main frames as well when RVH goes away. |
503 bool render_frame_created_; | 517 bool render_frame_created_; |
504 | 518 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 | 567 |
554 // NOTE: This must be the last member. | 568 // NOTE: This must be the last member. |
555 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 569 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
556 | 570 |
557 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 571 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
558 }; | 572 }; |
559 | 573 |
560 } // namespace content | 574 } // namespace content |
561 | 575 |
562 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 576 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |