| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 183 |
| 184 int surface_id() const { return surface_id_; } | 184 int surface_id() const { return surface_id_; } |
| 185 | 185 |
| 186 bool empty() const { return current_size_.IsEmpty(); } | 186 bool empty() const { return current_size_.IsEmpty(); } |
| 187 | 187 |
| 188 // Called when a renderer object already been created for this host, and we | 188 // Called when a renderer object already been created for this host, and we |
| 189 // just need to be attached to it. Used for window.open, <select> dropdown | 189 // just need to be attached to it. Used for window.open, <select> dropdown |
| 190 // menus, and other times when the renderer initiates creating an object. | 190 // menus, and other times when the renderer initiates creating an object. |
| 191 virtual void Init(); | 191 virtual void Init(); |
| 192 | 192 |
| 193 // Initializes a RenderWidgetHost that is attached to a RenderFrameHost. |
| 194 void InitForFrame(); |
| 195 |
| 196 // Signal whether this RenderWidgetHost is owned by a RenderFrameHost, in |
| 197 // which case it does not do self-deletion. |
| 198 void set_owned_by_render_frame_host(bool owned_by_rfh) { |
| 199 owned_by_render_frame_host_ = owned_by_rfh; |
| 200 } |
| 201 |
| 202 // Called by RenderFrameHost before destroying this object. |
| 203 void Cleanup(); |
| 204 |
| 193 // Tells the renderer to die and then calls Destroy(). | 205 // Tells the renderer to die and then calls Destroy(). |
| 194 virtual void Shutdown(); | 206 virtual void Shutdown(); |
| 195 | 207 |
| 196 // IPC::Listener | 208 // IPC::Listener |
| 197 bool OnMessageReceived(const IPC::Message& msg) override; | 209 bool OnMessageReceived(const IPC::Message& msg) override; |
| 198 | 210 |
| 199 // Sends a message to the corresponding object in the renderer. | 211 // Sends a message to the corresponding object in the renderer. |
| 200 bool Send(IPC::Message* msg) override; | 212 bool Send(IPC::Message* msg) override; |
| 201 | 213 |
| 202 // Indicates if the page has finished loading. | 214 // Indicates if the page has finished loading. |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 std::list<HWND> dummy_windows_for_activation_; | 828 std::list<HWND> dummy_windows_for_activation_; |
| 817 #endif | 829 #endif |
| 818 | 830 |
| 819 RenderWidgetHostLatencyTracker latency_tracker_; | 831 RenderWidgetHostLatencyTracker latency_tracker_; |
| 820 | 832 |
| 821 int next_browser_snapshot_id_; | 833 int next_browser_snapshot_id_; |
| 822 typedef std::map<int, | 834 typedef std::map<int, |
| 823 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; | 835 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; |
| 824 PendingSnapshotMap pending_browser_snapshots_; | 836 PendingSnapshotMap pending_browser_snapshots_; |
| 825 | 837 |
| 838 // Indicates whether a RenderFramehost has ownership, in which case this |
| 839 // object does not self destroy. |
| 840 bool owned_by_render_frame_host_; |
| 841 |
| 826 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 842 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 827 | 843 |
| 828 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 844 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 829 }; | 845 }; |
| 830 | 846 |
| 831 } // namespace content | 847 } // namespace content |
| 832 | 848 |
| 833 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 849 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |