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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 const JavaScriptResultCallback& callback) OVERRIDE; | 69 const JavaScriptResultCallback& callback) OVERRIDE; |
70 virtual RenderViewHost* GetRenderViewHost() OVERRIDE; | 70 virtual RenderViewHost* GetRenderViewHost() OVERRIDE; |
71 virtual ServiceRegistry* GetServiceRegistry() OVERRIDE; | 71 virtual ServiceRegistry* GetServiceRegistry() OVERRIDE; |
72 | 72 |
73 // IPC::Sender | 73 // IPC::Sender |
74 virtual bool Send(IPC::Message* msg) OVERRIDE; | 74 virtual bool Send(IPC::Message* msg) OVERRIDE; |
75 | 75 |
76 // IPC::Listener | 76 // IPC::Listener |
77 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 77 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
78 | 78 |
| 79 bool CreateRenderFrame(int parent_routing_id); |
| 80 bool IsRenderFrameLive(); |
79 void Init(); | 81 void Init(); |
80 int routing_id() const { return routing_id_; } | 82 int routing_id() const { return routing_id_; } |
81 void OnCreateChildFrame(int new_routing_id, | 83 void OnCreateChildFrame(int new_routing_id, |
82 const std::string& frame_name); | 84 const std::string& frame_name); |
83 | 85 |
84 RenderViewHostImpl* render_view_host() { return render_view_host_; } | 86 RenderViewHostImpl* render_view_host() { return render_view_host_; } |
85 RenderFrameHostDelegate* delegate() { return delegate_; } | 87 RenderFrameHostDelegate* delegate() { return delegate_; } |
86 FrameTreeNode* frame_tree_node() { return frame_tree_node_; } | 88 FrameTreeNode* frame_tree_node() { return frame_tree_node_; } |
87 // TODO(nasko): The RenderWidgetHost will be owned by RenderFrameHost in | 89 // TODO(nasko): The RenderWidgetHost will be owned by RenderFrameHost in |
88 // the future, so update this accessor to return the right pointer. | 90 // the future, so update this accessor to return the right pointer. |
89 RenderWidgetHostImpl* GetRenderWidgetHost(); | 91 RenderWidgetHostImpl* GetRenderWidgetHost(); |
| 92 bool has_received_swap_out_ack() { return has_received_swap_out_ack_; } |
90 | 93 |
91 // This function is called when this is a swapped out RenderFrameHost that | 94 // This function is called when this is a swapped out RenderFrameHost that |
92 // lives in the same process as the parent frame. The | 95 // lives in the same process as the parent frame. The |
93 // |cross_process_frame_connector| allows the non-swapped-out | 96 // |cross_process_frame_connector| allows the non-swapped-out |
94 // RenderFrameHost for a frame to communicate with the parent process | 97 // RenderFrameHost for a frame to communicate with the parent process |
95 // so that it may composite drawing data. | 98 // so that it may composite drawing data. |
96 // | 99 // |
97 // Ownership is not transfered. | 100 // Ownership is not transfered. |
98 void set_cross_process_frame_connector( | 101 void set_cross_process_frame_connector( |
99 CrossProcessFrameConnector* cross_process_frame_connector) { | 102 CrossProcessFrameConnector* cross_process_frame_connector) { |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 | 298 |
296 // The mapping of pending JavaScript calls created by | 299 // The mapping of pending JavaScript calls created by |
297 // ExecuteJavaScript and their corresponding callbacks. | 300 // ExecuteJavaScript and their corresponding callbacks. |
298 std::map<int, JavaScriptResultCallback> javascript_callbacks_; | 301 std::map<int, JavaScriptResultCallback> javascript_callbacks_; |
299 | 302 |
300 // Map from notification_id to a callback to cancel them. | 303 // Map from notification_id to a callback to cancel them. |
301 std::map<int, base::Closure> cancel_notification_callbacks_; | 304 std::map<int, base::Closure> cancel_notification_callbacks_; |
302 | 305 |
303 int routing_id_; | 306 int routing_id_; |
304 bool is_swapped_out_; | 307 bool is_swapped_out_; |
| 308 bool renderer_initialized_; |
| 309 bool has_received_swap_out_ack_; |
305 | 310 |
306 // When the last BeforeUnload message was sent. | 311 // When the last BeforeUnload message was sent. |
307 base::TimeTicks send_before_unload_start_time_; | 312 base::TimeTicks send_before_unload_start_time_; |
308 | 313 |
309 ServiceRegistryImpl service_registry_; | 314 ServiceRegistryImpl service_registry_; |
310 | 315 |
311 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; | 316 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; |
312 | 317 |
313 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); | 318 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); |
314 }; | 319 }; |
315 | 320 |
316 } // namespace content | 321 } // namespace content |
317 | 322 |
318 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ | 323 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ |
OLD | NEW |