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 Frame. | |
nasko
2015/01/14 20:08:05
nit: s/Frame/RenderFrameHost/
kenrb
2015/01/15 22:41:46
Done.
| |
194 void InitForFrame(); | |
195 | |
193 // Tells the renderer to die and then calls Destroy(). | 196 // Tells the renderer to die and then calls Destroy(). |
194 virtual void Shutdown(); | 197 virtual void Shutdown(); |
195 | 198 |
196 // IPC::Listener | 199 // IPC::Listener |
197 bool OnMessageReceived(const IPC::Message& msg) override; | 200 bool OnMessageReceived(const IPC::Message& msg) override; |
198 | 201 |
199 // Sends a message to the corresponding object in the renderer. | 202 // Sends a message to the corresponding object in the renderer. |
200 bool Send(IPC::Message* msg) override; | 203 bool Send(IPC::Message* msg) override; |
201 | 204 |
202 // Indicates if the page has finished loading. | 205 // 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_; | 819 std::list<HWND> dummy_windows_for_activation_; |
817 #endif | 820 #endif |
818 | 821 |
819 RenderWidgetHostLatencyTracker latency_tracker_; | 822 RenderWidgetHostLatencyTracker latency_tracker_; |
820 | 823 |
821 int next_browser_snapshot_id_; | 824 int next_browser_snapshot_id_; |
822 typedef std::map<int, | 825 typedef std::map<int, |
823 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; | 826 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; |
824 PendingSnapshotMap pending_browser_snapshots_; | 827 PendingSnapshotMap pending_browser_snapshots_; |
825 | 828 |
829 // Ownership by RenderFrameHost has lifetime implications. | |
nasko
2015/01/14 20:08:04
Can you add what those implications are?
kenrb
2015/01/15 22:41:46
Done.
| |
830 bool owned_by_render_frame_host_; | |
831 | |
826 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 832 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
827 | 833 |
828 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 834 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
829 }; | 835 }; |
830 | 836 |
831 } // namespace content | 837 } // namespace content |
832 | 838 |
833 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 839 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |