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 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // Lookup the RenderWidgetHelper from the render_process_host_id. Returns NULL | 118 // Lookup the RenderWidgetHelper from the render_process_host_id. Returns NULL |
119 // if not found. NOTE: The raw pointer is for temporary use only. To retain, | 119 // if not found. NOTE: The raw pointer is for temporary use only. To retain, |
120 // store in a scoped_refptr. | 120 // store in a scoped_refptr. |
121 static RenderWidgetHelper* FromProcessHostID(int render_process_host_id); | 121 static RenderWidgetHelper* FromProcessHostID(int render_process_host_id); |
122 | 122 |
123 // UI THREAD ONLY ----------------------------------------------------------- | 123 // UI THREAD ONLY ----------------------------------------------------------- |
124 | 124 |
125 // These three functions provide the backend implementation of the | 125 // These three functions provide the backend implementation of the |
126 // corresponding functions in RenderProcessHost. See those declarations | 126 // corresponding functions in RenderProcessHost. See those declarations |
127 // for documentation. | 127 // for documentation. |
128 void CancelResourceRequests(int render_widget_id); | |
129 void SimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); | 128 void SimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); |
130 bool WaitForBackingStoreMsg(int render_widget_id, | 129 bool WaitForBackingStoreMsg(int render_widget_id, |
131 const base::TimeDelta& max_delay, | 130 const base::TimeDelta& max_delay, |
132 IPC::Message* msg); | 131 IPC::Message* msg); |
133 // Called to resume the requests for a view after it's ready. The view was | 132 // Called to resume the requests for a view after it's ready. The view was |
134 // created by CreateNewWindow which initially blocked the requests. | 133 // created by CreateNewWindow which initially blocked the requests. |
135 void ResumeRequestsForView(int route_id); | 134 void ResumeRequestsForView(int route_id); |
136 | 135 |
137 #if defined(OS_MACOSX) | 136 #if defined(OS_MACOSX) |
138 // Given the id of a transport DIB, return a mapping to it or NULL on error. | 137 // Given the id of a transport DIB, return a mapping to it or NULL on error. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 void OnResumeRequestsForView(int route_id); | 202 void OnResumeRequestsForView(int route_id); |
204 | 203 |
205 // Called on the UI thread to finish creating a widget. | 204 // Called on the UI thread to finish creating a widget. |
206 void OnCreateWidgetOnUI(int opener_id, | 205 void OnCreateWidgetOnUI(int opener_id, |
207 int route_id, | 206 int route_id, |
208 WebKit::WebPopupType popup_type); | 207 WebKit::WebPopupType popup_type); |
209 | 208 |
210 // Called on the UI thread to create a fullscreen widget. | 209 // Called on the UI thread to create a fullscreen widget. |
211 void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id); | 210 void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id); |
212 | 211 |
213 // Called on the IO thread to cancel resource requests for the render widget. | |
214 void OnCancelResourceRequests(int render_widget_id); | |
215 | |
216 // Called on the IO thread to resume a cross-site response, if the ack is | 212 // Called on the IO thread to resume a cross-site response, if the ack is |
217 // not received as expected. | 213 // not received as expected. |
218 void OnSimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); | 214 void OnSimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); |
219 | 215 |
220 #if defined(OS_MACOSX) | 216 #if defined(OS_MACOSX) |
221 // Called on destruction to release all allocated transport DIBs | 217 // Called on destruction to release all allocated transport DIBs |
222 void ClearAllocatedDIBs(); | 218 void ClearAllocatedDIBs(); |
223 | 219 |
224 // On OSX we keep file descriptors to all the allocated DIBs around until | 220 // On OSX we keep file descriptors to all the allocated DIBs around until |
225 // the renderer frees them. | 221 // the renderer frees them. |
(...skipping 17 matching lines...) Expand all Loading... |
243 base::AtomicSequenceNumber next_routing_id_; | 239 base::AtomicSequenceNumber next_routing_id_; |
244 | 240 |
245 ResourceDispatcherHostImpl* resource_dispatcher_host_; | 241 ResourceDispatcherHostImpl* resource_dispatcher_host_; |
246 | 242 |
247 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); | 243 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); |
248 }; | 244 }; |
249 | 245 |
250 } // namespace content | 246 } // namespace content |
251 | 247 |
252 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ | 248 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
OLD | NEW |