| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 // Called on the IO thread to handle the freeing of a transport DIB | 183 // Called on the IO thread to handle the freeing of a transport DIB |
| 184 void FreeTransportDIB(TransportDIB::Id dib_id); | 184 void FreeTransportDIB(TransportDIB::Id dib_id); |
| 185 #endif | 185 #endif |
| 186 | 186 |
| 187 #if defined(OS_MACOSX) | 187 #if defined(OS_MACOSX) |
| 188 // Retrieve the render process and widget that was associated with an NSView. | 188 // Retrieve the render process and widget that was associated with an NSView. |
| 189 static bool GetRenderWidgetIDForWidget(gfx::AcceleratedWidget native_widget, | 189 static bool GetRenderWidgetIDForWidget(gfx::AcceleratedWidget native_widget, |
| 190 int* render_process_id, | 190 int* render_process_id, |
| 191 int* render_widget_id); | 191 int* render_widget_id); |
| 192 |
| 193 // To ensure that the message does not get dropped on the floor when |
| 194 // the RenderWidgetHelper it is sent to is destroyed, a task is posted to |
| 195 // handle the message. Get a token to identify this message, to ensure that |
| 196 // it is handled only once, |
| 197 // TODO(ccameron): Make RenderWidgetHelper message handling less hacky. |
| 198 // http://crbug.com/392031 |
| 199 static uint64 CreateNativeWidgetSwapToken(); |
| 192 #endif | 200 #endif |
| 193 | 201 |
| 194 private: | 202 private: |
| 195 // A class used to proxy a paint message. PaintMsgProxy objects are created | 203 // A class used to proxy a paint message. PaintMsgProxy objects are created |
| 196 // on the IO thread and destroyed on the UI thread. | 204 // on the IO thread and destroyed on the UI thread. |
| 197 class BackingStoreMsgProxy; | 205 class BackingStoreMsgProxy; |
| 198 friend class BackingStoreMsgProxy; | 206 friend class BackingStoreMsgProxy; |
| 199 friend class base::RefCountedThreadSafe<RenderWidgetHelper>; | 207 friend class base::RefCountedThreadSafe<RenderWidgetHelper>; |
| 200 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; | 208 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; |
| 201 friend class base::DeleteHelper<RenderWidgetHelper>; | 209 friend class base::DeleteHelper<RenderWidgetHelper>; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 base::AtomicSequenceNumber next_routing_id_; | 273 base::AtomicSequenceNumber next_routing_id_; |
| 266 | 274 |
| 267 ResourceDispatcherHostImpl* resource_dispatcher_host_; | 275 ResourceDispatcherHostImpl* resource_dispatcher_host_; |
| 268 | 276 |
| 269 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); | 277 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); |
| 270 }; | 278 }; |
| 271 | 279 |
| 272 } // namespace content | 280 } // namespace content |
| 273 | 281 |
| 274 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ | 282 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
| OLD | NEW |