| 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_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 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 | 167 |
| 168 // These methods modify how the next message is sent. Normally, when sending | 168 // These methods modify how the next message is sent. Normally, when sending |
| 169 // a synchronous message that runs a nested message loop, we need to suspend | 169 // a synchronous message that runs a nested message loop, we need to suspend |
| 170 // callbacks into WebKit. This involves disabling timers and deferring | 170 // callbacks into WebKit. This involves disabling timers and deferring |
| 171 // resource loads. However, there are exceptions when we need to customize | 171 // resource loads. However, there are exceptions when we need to customize |
| 172 // the behavior. | 172 // the behavior. |
| 173 void DoNotSuspendWebKitSharedTimer(); | 173 void DoNotSuspendWebKitSharedTimer(); |
| 174 void DoNotNotifyWebKitOfModalLoop(); | 174 void DoNotNotifyWebKitOfModalLoop(); |
| 175 | 175 |
| 176 // True if changing the focus of a RenderView requires a active user gesture. |
| 177 bool require_user_gesture_for_focus() const { |
| 178 return require_user_gesture_for_focus_; |
| 179 } |
| 180 void set_require_user_gesture_for_focus(bool require_gesture) { |
| 181 require_user_gesture_for_focus_ = require_gesture; |
| 182 } |
| 183 |
| 176 IPC::ForwardingMessageFilter* compositor_output_surface_filter() const { | 184 IPC::ForwardingMessageFilter* compositor_output_surface_filter() const { |
| 177 return compositor_output_surface_filter_.get(); | 185 return compositor_output_surface_filter_.get(); |
| 178 } | 186 } |
| 179 | 187 |
| 180 // Will be NULL if threaded compositing has not been enabled. | 188 // Will be NULL if threaded compositing has not been enabled. |
| 181 CompositorThread* compositor_thread() const { | 189 CompositorThread* compositor_thread() const { |
| 182 return compositor_thread_.get(); | 190 return compositor_thread_.get(); |
| 183 } | 191 } |
| 184 | 192 |
| 185 AppCacheDispatcher* appcache_dispatcher() const { | 193 AppCacheDispatcher* appcache_dispatcher() const { |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 374 |
| 367 // The current value of the idle notification timer delay. | 375 // The current value of the idle notification timer delay. |
| 368 int64 idle_notification_delay_in_ms_; | 376 int64 idle_notification_delay_in_ms_; |
| 369 | 377 |
| 370 // The number of idle handler calls that skip sending idle notifications. | 378 // The number of idle handler calls that skip sending idle notifications. |
| 371 int idle_notifications_to_skip_; | 379 int idle_notifications_to_skip_; |
| 372 | 380 |
| 373 bool suspend_webkit_shared_timer_; | 381 bool suspend_webkit_shared_timer_; |
| 374 bool notify_webkit_of_modal_loop_; | 382 bool notify_webkit_of_modal_loop_; |
| 375 | 383 |
| 384 bool require_user_gesture_for_focus_; |
| 385 |
| 376 // Timer that periodically calls IdleHandler. | 386 // Timer that periodically calls IdleHandler. |
| 377 base::RepeatingTimer<RenderThreadImpl> idle_timer_; | 387 base::RepeatingTimer<RenderThreadImpl> idle_timer_; |
| 378 | 388 |
| 379 // The channel from the renderer process to the GPU process. | 389 // The channel from the renderer process to the GPU process. |
| 380 scoped_refptr<GpuChannelHost> gpu_channel_; | 390 scoped_refptr<GpuChannelHost> gpu_channel_; |
| 381 | 391 |
| 382 // A lazily initiated thread on which file operations are run. | 392 // A lazily initiated thread on which file operations are run. |
| 383 scoped_ptr<base::Thread> file_thread_; | 393 scoped_ptr<base::Thread> file_thread_; |
| 384 | 394 |
| 385 bool compositor_initialized_; | 395 bool compositor_initialized_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 396 scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_; | 406 scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_; |
| 397 | 407 |
| 398 HistogramCustomizer histogram_customizer_; | 408 HistogramCustomizer histogram_customizer_; |
| 399 | 409 |
| 400 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 410 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
| 401 }; | 411 }; |
| 402 | 412 |
| 403 } // namespace content | 413 } // namespace content |
| 404 | 414 |
| 405 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 415 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
| OLD | NEW |