| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_RENDER_THREAD_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_H_ |
| 6 #define CONTENT_RENDERER_RENDER_THREAD_H_ | 6 #define CONTENT_RENDERER_RENDER_THREAD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class AppCacheDispatcher; | 25 class AppCacheDispatcher; |
| 26 class AudioInputMessageFilter; | 26 class AudioInputMessageFilter; |
| 27 class AudioMessageFilter; | 27 class AudioMessageFilter; |
| 28 class DBMessageFilter; | 28 class DBMessageFilter; |
| 29 class DevToolsAgentFilter; | 29 class DevToolsAgentFilter; |
| 30 class FilePath; | 30 class FilePath; |
| 31 class GpuChannelHost; | 31 class GpuChannelHost; |
| 32 class IndexedDBDispatcher; | 32 class IndexedDBDispatcher; |
| 33 class RendererHistogram; | 33 class RendererHistogram; |
| 34 class RendererHistogramSnapshots; | 34 class RendererHistogramSnapshots; |
| 35 class RenderProcessObserver; | |
| 36 class RendererNetPredictor; | 35 class RendererNetPredictor; |
| 37 class RendererWebKitPlatformSupportImpl; | 36 class RendererWebKitPlatformSupportImpl; |
| 38 class SkBitmap; | 37 class SkBitmap; |
| 39 class VideoCaptureImplManager; | 38 class VideoCaptureImplManager; |
| 40 class WebDatabaseObserverImpl; | 39 class WebDatabaseObserverImpl; |
| 41 | 40 |
| 42 struct RendererPreferences; | 41 struct RendererPreferences; |
| 43 struct DOMStorageMsg_Event_Params; | 42 struct DOMStorageMsg_Event_Params; |
| 44 struct GPUInfo; | 43 struct GPUInfo; |
| 45 struct ViewMsg_New_Params; | 44 struct ViewMsg_New_Params; |
| 46 struct WebPreferences; | 45 struct WebPreferences; |
| 47 | 46 |
| 48 namespace base { | |
| 49 class MessageLoopProxy; | |
| 50 class Thread; | |
| 51 } | |
| 52 | |
| 53 namespace IPC { | 47 namespace IPC { |
| 54 struct ChannelHandle; | 48 struct ChannelHandle; |
| 55 } | 49 } |
| 56 | 50 |
| 57 namespace WebKit { | 51 namespace WebKit { |
| 58 class WebStorageEventDispatcher; | 52 class WebStorageEventDispatcher; |
| 59 } | 53 } |
| 60 | 54 |
| 55 namespace base { |
| 56 class MessageLoopProxy; |
| 57 class Thread; |
| 58 } |
| 59 |
| 60 namespace content { |
| 61 class RenderProcessObserver; |
| 62 } |
| 63 |
| 61 namespace v8 { | 64 namespace v8 { |
| 62 class Extension; | 65 class Extension; |
| 63 } | 66 } |
| 64 | 67 |
| 65 // The RenderThreadBase is the minimal interface that a RenderView/Widget | 68 // The RenderThreadBase is the minimal interface that a RenderView/Widget |
| 66 // expects from a render thread. The interface basically abstracts a way to send | 69 // expects from a render thread. The interface basically abstracts a way to send |
| 67 // and receive messages. | 70 // and receive messages. |
| 68 // | 71 // |
| 69 // TODO(brettw): This has two different and opposing usage patterns which | 72 // TODO(brettw): This has two different and opposing usage patterns which |
| 70 // make it confusing. It can be accessed through RenderThread::current(), which | 73 // make it confusing. It can be accessed through RenderThread::current(), which |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 129 |
| 127 // Overridden from RenderThreadBase. | 130 // Overridden from RenderThreadBase. |
| 128 virtual bool Send(IPC::Message* msg); | 131 virtual bool Send(IPC::Message* msg); |
| 129 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); | 132 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); |
| 130 virtual void RemoveRoute(int32 routing_id); | 133 virtual void RemoveRoute(int32 routing_id); |
| 131 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter); | 134 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter); |
| 132 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter); | 135 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter); |
| 133 virtual void WidgetHidden(); | 136 virtual void WidgetHidden(); |
| 134 virtual void WidgetRestored(); | 137 virtual void WidgetRestored(); |
| 135 | 138 |
| 136 void AddObserver(RenderProcessObserver* observer); | 139 void AddObserver(content::RenderProcessObserver* observer); |
| 137 void RemoveObserver(RenderProcessObserver* observer); | 140 void RemoveObserver(content::RenderProcessObserver* observer); |
| 138 | 141 |
| 139 // These methods modify how the next message is sent. Normally, when sending | 142 // These methods modify how the next message is sent. Normally, when sending |
| 140 // a synchronous message that runs a nested message loop, we need to suspend | 143 // a synchronous message that runs a nested message loop, we need to suspend |
| 141 // callbacks into WebKit. This involves disabling timers and deferring | 144 // callbacks into WebKit. This involves disabling timers and deferring |
| 142 // resource loads. However, there are exceptions when we need to customize | 145 // resource loads. However, there are exceptions when we need to customize |
| 143 // the behavior. | 146 // the behavior. |
| 144 void DoNotSuspendWebKitSharedTimer(); | 147 void DoNotSuspendWebKitSharedTimer(); |
| 145 void DoNotNotifyWebKitOfModalLoop(); | 148 void DoNotNotifyWebKitOfModalLoop(); |
| 146 | 149 |
| 147 AppCacheDispatcher* appcache_dispatcher() const { | 150 AppCacheDispatcher* appcache_dispatcher() const { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 272 |
| 270 // The channel from the renderer process to the GPU process. | 273 // The channel from the renderer process to the GPU process. |
| 271 scoped_refptr<GpuChannelHost> gpu_channel_; | 274 scoped_refptr<GpuChannelHost> gpu_channel_; |
| 272 | 275 |
| 273 // A lazily initiated thread on which file operations are run. | 276 // A lazily initiated thread on which file operations are run. |
| 274 scoped_ptr<base::Thread> file_thread_; | 277 scoped_ptr<base::Thread> file_thread_; |
| 275 | 278 |
| 276 // Map of registered v8 extensions. The key is the extension name. | 279 // Map of registered v8 extensions. The key is the extension name. |
| 277 std::set<std::string> v8_extensions_; | 280 std::set<std::string> v8_extensions_; |
| 278 | 281 |
| 279 ObserverList<RenderProcessObserver> observers_; | 282 ObserverList<content::RenderProcessObserver> observers_; |
| 280 | 283 |
| 281 DISALLOW_COPY_AND_ASSIGN(RenderThread); | 284 DISALLOW_COPY_AND_ASSIGN(RenderThread); |
| 282 }; | 285 }; |
| 283 | 286 |
| 284 #endif // CONTENT_RENDERER_RENDER_THREAD_H_ | 287 #endif // CONTENT_RENDERER_RENDER_THREAD_H_ |
| OLD | NEW |