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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 | 182 |
183 // These methods modify how the next message is sent. Normally, when sending | 183 // These methods modify how the next message is sent. Normally, when sending |
184 // a synchronous message that runs a nested message loop, we need to suspend | 184 // a synchronous message that runs a nested message loop, we need to suspend |
185 // callbacks into WebKit. This involves disabling timers and deferring | 185 // callbacks into WebKit. This involves disabling timers and deferring |
186 // resource loads. However, there are exceptions when we need to customize | 186 // resource loads. However, there are exceptions when we need to customize |
187 // the behavior. | 187 // the behavior. |
188 void DoNotSuspendWebKitSharedTimer(); | 188 void DoNotSuspendWebKitSharedTimer(); |
189 void DoNotNotifyWebKitOfModalLoop(); | 189 void DoNotNotifyWebKitOfModalLoop(); |
190 | 190 |
191 // True if focus changes should be send via IPC to the browser. | 191 // True if we are running layout tests. This currently disables forwarding |
192 bool should_send_focus_ipcs() const { | 192 // various status messages to the console, skips network error pages, and |
193 return should_send_focus_ipcs_; | 193 // short circuits size update and focus events. |
| 194 bool layout_test_mode() const { |
| 195 return layout_test_mode_; |
194 } | 196 } |
195 void set_should_send_focus_ipcs(bool send) { | 197 void set_layout_test_mode(bool layout_test_mode) { |
196 should_send_focus_ipcs_ = send; | 198 layout_test_mode_ = layout_test_mode; |
197 } | |
198 | |
199 // True if RenderWidgets should report the newly requested size back to | |
200 // WebKit without waiting for the browser to acknowledge the size. | |
201 bool short_circuit_size_updates() const { | |
202 return short_circuit_size_updates_; | |
203 } | |
204 void set_short_circuit_size_updates(bool short_circuit) { | |
205 short_circuit_size_updates_ = short_circuit; | |
206 } | |
207 | |
208 // True if we should never display error pages in response to a failed load. | |
209 bool skip_error_pages() const { | |
210 return skip_error_pages_; | |
211 } | |
212 void set_skip_error_pages(bool skip) { | |
213 skip_error_pages_ = skip; | |
214 } | 199 } |
215 | 200 |
216 IPC::ForwardingMessageFilter* compositor_output_surface_filter() const { | 201 IPC::ForwardingMessageFilter* compositor_output_surface_filter() const { |
217 return compositor_output_surface_filter_.get(); | 202 return compositor_output_surface_filter_.get(); |
218 } | 203 } |
219 | 204 |
220 InputHandlerManager* input_handler_manager() const { | 205 InputHandlerManager* input_handler_manager() const { |
221 return input_handler_manager_.get(); | 206 return input_handler_manager_.get(); |
222 } | 207 } |
223 | 208 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 | 411 |
427 // The current value of the idle notification timer delay. | 412 // The current value of the idle notification timer delay. |
428 int64 idle_notification_delay_in_ms_; | 413 int64 idle_notification_delay_in_ms_; |
429 | 414 |
430 // The number of idle handler calls that skip sending idle notifications. | 415 // The number of idle handler calls that skip sending idle notifications. |
431 int idle_notifications_to_skip_; | 416 int idle_notifications_to_skip_; |
432 | 417 |
433 bool suspend_webkit_shared_timer_; | 418 bool suspend_webkit_shared_timer_; |
434 bool notify_webkit_of_modal_loop_; | 419 bool notify_webkit_of_modal_loop_; |
435 | 420 |
436 // The following flags are used to control layout test specific behavior. | 421 // The following flag is used to control layout test specific behavior. |
437 bool should_send_focus_ipcs_; | 422 bool layout_test_mode_; |
438 bool short_circuit_size_updates_; | |
439 bool skip_error_pages_; | |
440 | 423 |
441 // Timer that periodically calls IdleHandler. | 424 // Timer that periodically calls IdleHandler. |
442 base::RepeatingTimer<RenderThreadImpl> idle_timer_; | 425 base::RepeatingTimer<RenderThreadImpl> idle_timer_; |
443 | 426 |
444 // The channel from the renderer process to the GPU process. | 427 // The channel from the renderer process to the GPU process. |
445 scoped_refptr<GpuChannelHost> gpu_channel_; | 428 scoped_refptr<GpuChannelHost> gpu_channel_; |
446 | 429 |
447 // A lazily initiated thread on which file operations are run. | 430 // A lazily initiated thread on which file operations are run. |
448 scoped_ptr<base::Thread> file_thread_; | 431 scoped_ptr<base::Thread> file_thread_; |
449 | 432 |
(...skipping 23 matching lines...) Expand all Loading... |
473 scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_; | 456 scoped_ptr<media::AudioHardwareConfig> audio_hardware_config_; |
474 | 457 |
475 HistogramCustomizer histogram_customizer_; | 458 HistogramCustomizer histogram_customizer_; |
476 | 459 |
477 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); | 460 DISALLOW_COPY_AND_ASSIGN(RenderThreadImpl); |
478 }; | 461 }; |
479 | 462 |
480 } // namespace content | 463 } // namespace content |
481 | 464 |
482 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ | 465 #endif // CONTENT_RENDERER_RENDER_THREAD_IMPL_H_ |
OLD | NEW |