| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // if not found. NOTE: The raw pointer is for temporary use only. To retain, | 121 // if not found. NOTE: The raw pointer is for temporary use only. To retain, |
| 122 // store in a scoped_refptr. | 122 // store in a scoped_refptr. |
| 123 static RenderWidgetHelper* FromProcessHostID(int render_process_host_id); | 123 static RenderWidgetHelper* FromProcessHostID(int render_process_host_id); |
| 124 | 124 |
| 125 // UI THREAD ONLY ----------------------------------------------------------- | 125 // UI THREAD ONLY ----------------------------------------------------------- |
| 126 | 126 |
| 127 // These three functions provide the backend implementation of the | 127 // These three functions provide the backend implementation of the |
| 128 // corresponding functions in RenderProcessHost. See those declarations | 128 // corresponding functions in RenderProcessHost. See those declarations |
| 129 // for documentation. | 129 // for documentation. |
| 130 void CancelResourceRequests(int render_widget_id); | 130 void CancelResourceRequests(int render_widget_id); |
| 131 void SimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); | 131 void CrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params); |
| 132 bool WaitForBackingStoreMsg(int render_widget_id, | 132 bool WaitForBackingStoreMsg(int render_widget_id, |
| 133 const base::TimeDelta& max_delay, | 133 const base::TimeDelta& max_delay, |
| 134 IPC::Message* msg); | 134 IPC::Message* msg); |
| 135 | 135 |
| 136 #if defined(OS_MACOSX) | 136 #if defined(OS_MACOSX) |
| 137 // 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. |
| 138 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); | 138 TransportDIB* MapTransportDIB(TransportDIB::Id dib_id); |
| 139 #endif | 139 #endif |
| 140 | 140 |
| 141 // IO THREAD ONLY ----------------------------------------------------------- | 141 // IO THREAD ONLY ----------------------------------------------------------- |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 void OnCreateWidgetOnUI(int opener_id, | 202 void OnCreateWidgetOnUI(int opener_id, |
| 203 int route_id, | 203 int route_id, |
| 204 WebKit::WebPopupType popup_type); | 204 WebKit::WebPopupType popup_type); |
| 205 | 205 |
| 206 // Called on the UI thread to create a fullscreen widget. | 206 // Called on the UI thread to create a fullscreen widget. |
| 207 void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id); | 207 void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id); |
| 208 | 208 |
| 209 // Called on the IO thread to cancel resource requests for the render widget. | 209 // Called on the IO thread to cancel resource requests for the render widget. |
| 210 void OnCancelResourceRequests(int render_widget_id); | 210 void OnCancelResourceRequests(int render_widget_id); |
| 211 | 211 |
| 212 // 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. |
| 213 // not received as expected. | 213 void OnCrossSiteSwapOutACK(const ViewMsg_SwapOut_Params& params); |
| 214 void OnSimulateSwapOutACK(const ViewMsg_SwapOut_Params& params); | |
| 215 | 214 |
| 216 #if defined(OS_MACOSX) | 215 #if defined(OS_MACOSX) |
| 217 // Called on destruction to release all allocated transport DIBs | 216 // Called on destruction to release all allocated transport DIBs |
| 218 void ClearAllocatedDIBs(); | 217 void ClearAllocatedDIBs(); |
| 219 | 218 |
| 220 // On OSX we keep file descriptors to all the allocated DIBs around until | 219 // On OSX we keep file descriptors to all the allocated DIBs around until |
| 221 // the renderer frees them. | 220 // the renderer frees them. |
| 222 base::Lock allocated_dibs_lock_; | 221 base::Lock allocated_dibs_lock_; |
| 223 std::map<TransportDIB::Id, int> allocated_dibs_; | 222 std::map<TransportDIB::Id, int> allocated_dibs_; |
| 224 #endif | 223 #endif |
| (...skipping 12 matching lines...) Expand all Loading... |
| 237 | 236 |
| 238 // The next routing id to use. | 237 // The next routing id to use. |
| 239 base::AtomicSequenceNumber next_routing_id_; | 238 base::AtomicSequenceNumber next_routing_id_; |
| 240 | 239 |
| 241 content::ResourceDispatcherHostImpl* resource_dispatcher_host_; | 240 content::ResourceDispatcherHostImpl* resource_dispatcher_host_; |
| 242 | 241 |
| 243 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); | 242 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); |
| 244 }; | 243 }; |
| 245 | 244 |
| 246 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ | 245 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
| OLD | NEW |