| 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 12 matching lines...) Expand all Loading... |
| 23 #include "ui/surface/transport_dib.h" | 23 #include "ui/surface/transport_dib.h" |
| 24 | 24 |
| 25 namespace IPC { | 25 namespace IPC { |
| 26 class Message; | 26 class Message; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace base { | 29 namespace base { |
| 30 class TimeDelta; | 30 class TimeDelta; |
| 31 } | 31 } |
| 32 | 32 |
| 33 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
| 33 struct ViewHostMsg_CreateWindow_Params; | 34 struct ViewHostMsg_CreateWindow_Params; |
| 34 struct ViewMsg_SwapOut_Params; | 35 struct ViewMsg_SwapOut_Params; |
| 35 | 36 |
| 36 namespace content { | 37 namespace content { |
| 38 class GpuProcessHost; |
| 37 class ResourceDispatcherHostImpl; | 39 class ResourceDispatcherHostImpl; |
| 38 class SessionStorageNamespace; | 40 class SessionStorageNamespace; |
| 39 | 41 |
| 40 // Instantiated per RenderProcessHost to provide various optimizations on | 42 // Instantiated per RenderProcessHost to provide various optimizations on |
| 41 // behalf of a RenderWidgetHost. This class bridges between the IO thread | 43 // behalf of a RenderWidgetHost. This class bridges between the IO thread |
| 42 // where the RenderProcessHost's MessageFilter lives and the UI thread where | 44 // where the RenderProcessHost's MessageFilter lives and the UI thread where |
| 43 // the RenderWidgetHost lives. | 45 // the RenderWidgetHost lives. |
| 44 // | 46 // |
| 45 // | 47 // |
| 46 // OPTIMIZED RESIZE | 48 // OPTIMIZED RESIZE |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // FreeTransportDIB(). In all cases, the caller is responsible for deleting | 162 // FreeTransportDIB(). In all cases, the caller is responsible for deleting |
| 161 // the resulting TransportDIB. | 163 // the resulting TransportDIB. |
| 162 void AllocTransportDIB(uint32 size, | 164 void AllocTransportDIB(uint32 size, |
| 163 bool cache_in_browser, | 165 bool cache_in_browser, |
| 164 TransportDIB::Handle* result); | 166 TransportDIB::Handle* result); |
| 165 | 167 |
| 166 // Called on the IO thread to handle the freeing of a transport DIB | 168 // Called on the IO thread to handle the freeing of a transport DIB |
| 167 void FreeTransportDIB(TransportDIB::Id dib_id); | 169 void FreeTransportDIB(TransportDIB::Id dib_id); |
| 168 #endif | 170 #endif |
| 169 | 171 |
| 172 #if defined(OS_MACOSX) |
| 173 static void OnNativeSurfaceBuffersSwapped( |
| 174 GpuProcessHost* gpu_process_host, |
| 175 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params); |
| 176 #endif |
| 177 |
| 170 private: | 178 private: |
| 171 // A class used to proxy a paint message. PaintMsgProxy objects are created | 179 // A class used to proxy a paint message. PaintMsgProxy objects are created |
| 172 // on the IO thread and destroyed on the UI thread. | 180 // on the IO thread and destroyed on the UI thread. |
| 173 class BackingStoreMsgProxy; | 181 class BackingStoreMsgProxy; |
| 174 friend class BackingStoreMsgProxy; | 182 friend class BackingStoreMsgProxy; |
| 175 friend class base::RefCountedThreadSafe<RenderWidgetHelper>; | 183 friend class base::RefCountedThreadSafe<RenderWidgetHelper>; |
| 176 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; | 184 friend struct BrowserThread::DeleteOnThread<BrowserThread::IO>; |
| 177 friend class base::DeleteHelper<RenderWidgetHelper>; | 185 friend class base::DeleteHelper<RenderWidgetHelper>; |
| 178 | 186 |
| 179 typedef std::deque<BackingStoreMsgProxy*> BackingStoreMsgProxyQueue; | 187 typedef std::deque<BackingStoreMsgProxy*> BackingStoreMsgProxyQueue; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 base::AtomicSequenceNumber next_routing_id_; | 245 base::AtomicSequenceNumber next_routing_id_; |
| 238 | 246 |
| 239 ResourceDispatcherHostImpl* resource_dispatcher_host_; | 247 ResourceDispatcherHostImpl* resource_dispatcher_host_; |
| 240 | 248 |
| 241 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); | 249 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHelper); |
| 242 }; | 250 }; |
| 243 | 251 |
| 244 } // namespace content | 252 } // namespace content |
| 245 | 253 |
| 246 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ | 254 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HELPER_H_ |
| OLD | NEW |