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_HELPER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 // Gets the next available routing id. This is thread safe. | 106 // Gets the next available routing id. This is thread safe. |
107 int GetNextRoutingID(); | 107 int GetNextRoutingID(); |
108 | 108 |
109 | 109 |
110 // UI THREAD ONLY ----------------------------------------------------------- | 110 // UI THREAD ONLY ----------------------------------------------------------- |
111 | 111 |
112 // These three functions provide the backend implementation of the | 112 // These three functions provide the backend implementation of the |
113 // corresponding functions in RenderProcessHost. See those declarations | 113 // corresponding functions in RenderProcessHost. See those declarations |
114 // for documentation. | 114 // for documentation. |
115 void CancelResourceRequests(int render_widget_id); | 115 void CancelResourceRequests(int render_widget_id); |
116 void CrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params); | 116 void SimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); |
117 bool WaitForUpdateMsg(int render_widget_id, | 117 bool WaitForUpdateMsg(int render_widget_id, |
118 const base::TimeDelta& max_delay, | 118 const base::TimeDelta& max_delay, |
119 IPC::Message* msg); | 119 IPC::Message* msg); |
120 | 120 |
121 #if defined(OS_MACOSX) | 121 #if defined(OS_MACOSX) |
122 // Given the id of a transport DIB, return a mapping to it or NULL on error. | 122 // Given the id of a transport DIB, return a mapping to it or NULL on error. |
123 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); | 123 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); |
124 #endif | 124 #endif |
125 | 125 |
126 // IO THREAD ONLY ----------------------------------------------------------- | 126 // IO THREAD ONLY ----------------------------------------------------------- |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 void OnCreateWidgetOnUI(int opener_id, | 183 void OnCreateWidgetOnUI(int opener_id, |
184 int route_id, | 184 int route_id, |
185 WebKit::WebPopupType popup_type); | 185 WebKit::WebPopupType popup_type); |
186 | 186 |
187 // Called on the UI thread to create a fullscreen widget. | 187 // Called on the UI thread to create a fullscreen widget. |
188 void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id); | 188 void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id); |
189 | 189 |
190 // Called on the IO thread to cancel resource requests for the render widget. | 190 // Called on the IO thread to cancel resource requests for the render widget. |
191 void OnCancelResourceRequests(int render_widget_id); | 191 void OnCancelResourceRequests(int render_widget_id); |
192 | 192 |
193 // Called on the IO thread to resume a cross-site response. | 193 // Called on the IO thread to resume a cross-site response. |
Charlie Reis
2012/04/06 22:34:14
nit: ...if the ack is not received as expected.
nasko
2012/04/10 00:16:37
Done.
| |
194 void OnCrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params); | 194 void OnSimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); |
195 | 195 |
196 #if defined(OS_MACOSX) | 196 #if defined(OS_MACOSX) |
197 // Called on destruction to release all allocated transport DIBs | 197 // Called on destruction to release all allocated transport DIBs |
198 void ClearAllocatedDIBs(); | 198 void ClearAllocatedDIBs(); |
199 | 199 |
200 // On OSX we keep file descriptors to all the allocated DIBs around until | 200 // On OSX we keep file descriptors to all the allocated DIBs around until |
201 // the renderer frees them. | 201 // the renderer frees them. |
202 base::Lock allocated_dibs_lock_; | 202 base::Lock allocated_dibs_lock_; |
203 std::map<TransportDIB::Id, int> allocated_dibs_; | 203 std::map<TransportDIB::Id, int> allocated_dibs_; |
204 #endif | 204 #endif |
(...skipping 11 matching lines...) Expand all Loading... | |
216 | 216 |
217 // The next routing id to use. | 217 // The next routing id to use. |
218 base::AtomicSequenceNumber next_routing_id_; | 218 base::AtomicSequenceNumber next_routing_id_; |
219 | 219 |
220 content::ResourceDispatcherHostImpl* resource_dispatcher_host_; | 220 content::ResourceDispatcherHostImpl* resource_dispatcher_host_; |
221 | 221 |
222 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); | 222 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); |
223 }; | 223 }; |
224 | 224 |
225 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ | 225 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
OLD | NEW |