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_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 content::ResourceDispatcherDelegate* delegate) OVERRIDE; | 101 content::ResourceDispatcherDelegate* delegate) OVERRIDE; |
102 virtual void WidgetHidden() OVERRIDE; | 102 virtual void WidgetHidden() OVERRIDE; |
103 virtual void WidgetRestored() OVERRIDE; | 103 virtual void WidgetRestored() OVERRIDE; |
104 virtual void EnsureWebKitInitialized() OVERRIDE; | 104 virtual void EnsureWebKitInitialized() OVERRIDE; |
105 virtual void RecordUserMetrics(const std::string& action) OVERRIDE; | 105 virtual void RecordUserMetrics(const std::string& action) OVERRIDE; |
106 virtual base::SharedMemoryHandle HostAllocateSharedMemoryBuffer( | 106 virtual base::SharedMemoryHandle HostAllocateSharedMemoryBuffer( |
107 uint32 buffer_size) OVERRIDE; | 107 uint32 buffer_size) OVERRIDE; |
108 virtual void RegisterExtension(v8::Extension* extension) OVERRIDE; | 108 virtual void RegisterExtension(v8::Extension* extension) OVERRIDE; |
109 virtual bool IsRegisteredExtension( | 109 virtual bool IsRegisteredExtension( |
110 const std::string& v8_extension_name) const OVERRIDE; | 110 const std::string& v8_extension_name) const OVERRIDE; |
111 virtual void ScheduleIdleHandler(double initial_delay_s) OVERRIDE; | 111 virtual void ScheduleIdleHandler(int64 initial_delay_ms) OVERRIDE; |
112 virtual void IdleHandler() OVERRIDE; | 112 virtual void IdleHandler() OVERRIDE; |
113 virtual double GetIdleNotificationDelayInS() const OVERRIDE; | 113 virtual int64 GetIdleNotificationDelayInMs() const OVERRIDE; |
114 virtual void SetIdleNotificationDelayInS( | 114 virtual void SetIdleNotificationDelayInMs( |
115 double idle_notification_delay_in_s) OVERRIDE; | 115 int64 idle_notification_delay_in_ms) OVERRIDE; |
116 #if defined(OS_WIN) | 116 #if defined(OS_WIN) |
117 virtual void PreCacheFont(const LOGFONT& log_font) OVERRIDE; | 117 virtual void PreCacheFont(const LOGFONT& log_font) OVERRIDE; |
118 virtual void ReleaseCachedFonts() OVERRIDE; | 118 virtual void ReleaseCachedFonts() OVERRIDE; |
119 #endif | 119 #endif |
120 | 120 |
121 // These methods modify how the next message is sent. Normally, when sending | 121 // These methods modify how the next message is sent. Normally, when sending |
122 // a synchronous message that runs a nested message loop, we need to suspend | 122 // a synchronous message that runs a nested message loop, we need to suspend |
123 // callbacks into WebKit. This involves disabling timers and deferring | 123 // callbacks into WebKit. This involves disabling timers and deferring |
124 // resource loads. However, there are exceptions when we need to customize | 124 // resource loads. However, there are exceptions when we need to customize |
125 // the behavior. | 125 // the behavior. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 // If true, then a GetPlugins call is allowed to rescan the disk. | 209 // If true, then a GetPlugins call is allowed to rescan the disk. |
210 bool plugin_refresh_allowed_; | 210 bool plugin_refresh_allowed_; |
211 | 211 |
212 // The count of RenderWidgets running through this thread. | 212 // The count of RenderWidgets running through this thread. |
213 int widget_count_; | 213 int widget_count_; |
214 | 214 |
215 // The count of hidden RenderWidgets running through this thread. | 215 // The count of hidden RenderWidgets running through this thread. |
216 int hidden_widget_count_; | 216 int hidden_widget_count_; |
217 | 217 |
218 // The current value of the idle notification timer delay. | 218 // The current value of the idle notification timer delay. |
219 double idle_notification_delay_in_s_; | 219 int64 idle_notification_delay_in_ms_; |
220 | 220 |
221 bool suspend_webkit_shared_timer_; | 221 bool suspend_webkit_shared_timer_; |
222 bool notify_webkit_of_modal_loop_; | 222 bool notify_webkit_of_modal_loop_; |
223 | 223 |
224 // Timer that periodically calls IdleHandler. | 224 // Timer that periodically calls IdleHandler. |
225 base::RepeatingTimer<RenderThreadImpl> idle_timer_; | 225 base::RepeatingTimer<RenderThreadImpl> idle_timer_; |
226 | 226 |
227 // The channel from the renderer process to the GPU process. | 227 // The channel from the renderer process to the GPU process. |
228 scoped_refptr<GpuChannelHost> gpu_channel_; | 228 scoped_refptr<GpuChannelHost> gpu_channel_; |
229 | 229 |
230 // A lazily initiated thread on which file operations are run. | 230 // A lazily initiated thread on which file operations are run. |
231 scoped_ptr<base::Thread> file_thread_; | 231 scoped_ptr<base::Thread> file_thread_; |
232 | 232 |
233 // Map of registered v8 extensions. The key is the extension name. | 233 // Map of registered v8 extensions. The key is the extension name. |
234 std::set<std::string> v8_extensions_; | 234 std::set<std::string> v8_extensions_; |
235 | 235 |
236 scoped_ptr<CompositorThread> compositor_thread_; | 236 scoped_ptr<CompositorThread> compositor_thread_; |
237 | 237 |
238 ObserverList<content::RenderProcessObserver> observers_; | 238 ObserverList<content::RenderProcessObserver> observers_; |
239 | 239 |
240 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 240 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
241 }; | 241 }; |
242 | 242 |
243 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 243 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
OLD | NEW |