| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_RENDERER_RENDER_THREAD_H_ | 5 #ifndef CHROME_RENDERER_RENDER_THREAD_H_ |
| 6 #define CHROME_RENDERER_RENDER_THREAD_H_ | 6 #define CHROME_RENDERER_RENDER_THREAD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 void OnSpellCheckWordAdded(const std::string& word); | 309 void OnSpellCheckWordAdded(const std::string& word); |
| 310 void OnSpellCheckEnableAutoSpellCorrect(bool enable); | 310 void OnSpellCheckEnableAutoSpellCorrect(bool enable); |
| 311 | 311 |
| 312 void OnGpuChannelEstablished(const IPC::ChannelHandle& channel_handle, | 312 void OnGpuChannelEstablished(const IPC::ChannelHandle& channel_handle, |
| 313 const GPUInfo& gpu_info); | 313 const GPUInfo& gpu_info); |
| 314 | 314 |
| 315 void OnSetPhishingModel(IPC::PlatformFileForTransit model_file); | 315 void OnSetPhishingModel(IPC::PlatformFileForTransit model_file); |
| 316 | 316 |
| 317 void OnGetAccessibilityTree(); | 317 void OnGetAccessibilityTree(); |
| 318 | 318 |
| 319 void OnSetSpeechInputEnabled(bool enabled); | |
| 320 | |
| 321 // Gather usage statistics from the in-memory cache and inform our host. | 319 // Gather usage statistics from the in-memory cache and inform our host. |
| 322 // These functions should be call periodically so that the host can make | 320 // These functions should be call periodically so that the host can make |
| 323 // decisions about how to allocation resources using current information. | 321 // decisions about how to allocation resources using current information. |
| 324 void InformHostOfCacheStats(); | 322 void InformHostOfCacheStats(); |
| 325 | 323 |
| 326 // We initialize WebKit as late as possible. | 324 // We initialize WebKit as late as possible. |
| 327 void EnsureWebKitInitialized(); | 325 void EnsureWebKitInitialized(); |
| 328 | 326 |
| 329 // A task we invoke periodically to assist with idle cleanup. | 327 // A task we invoke periodically to assist with idle cleanup. |
| 330 void IdleHandler(); | 328 void IdleHandler(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 | 379 |
| 382 // True if this renderer is running extensions. | 380 // True if this renderer is running extensions. |
| 383 bool is_extension_process_; | 381 bool is_extension_process_; |
| 384 | 382 |
| 385 // True if this renderer is incognito. | 383 // True if this renderer is incognito. |
| 386 bool is_incognito_process_; | 384 bool is_incognito_process_; |
| 387 | 385 |
| 388 bool suspend_webkit_shared_timer_; | 386 bool suspend_webkit_shared_timer_; |
| 389 bool notify_webkit_of_modal_loop_; | 387 bool notify_webkit_of_modal_loop_; |
| 390 | 388 |
| 391 // True if this renderer has speech input enabled, set once during thread | |
| 392 // initialization. | |
| 393 bool is_speech_input_enabled_; | |
| 394 | |
| 395 // Timer that periodically calls IdleHandler. | 389 // Timer that periodically calls IdleHandler. |
| 396 base::RepeatingTimer<RenderThread> idle_timer_; | 390 base::RepeatingTimer<RenderThread> idle_timer_; |
| 397 | 391 |
| 398 // Same as above, but on a longer timer and will run even if the process is | 392 // Same as above, but on a longer timer and will run even if the process is |
| 399 // not idle, to ensure that IdleHandle gets called eventually. | 393 // not idle, to ensure that IdleHandle gets called eventually. |
| 400 base::RepeatingTimer<RenderThread> forced_idle_timer_; | 394 base::RepeatingTimer<RenderThread> forced_idle_timer_; |
| 401 | 395 |
| 402 // The channel from the renderer process to the GPU process. | 396 // The channel from the renderer process to the GPU process. |
| 403 scoped_refptr<GpuChannelHost> gpu_channel_; | 397 scoped_refptr<GpuChannelHost> gpu_channel_; |
| 404 | 398 |
| 405 // A lazily initiated thread on which file operations are run. | 399 // A lazily initiated thread on which file operations are run. |
| 406 scoped_ptr<base::Thread> file_thread_; | 400 scoped_ptr<base::Thread> file_thread_; |
| 407 | 401 |
| 408 // Map of registered v8 extensions. The key is the extension name. The value | 402 // Map of registered v8 extensions. The key is the extension name. The value |
| 409 // is true if the extension should be restricted to extension-related | 403 // is true if the extension should be restricted to extension-related |
| 410 // contexts. | 404 // contexts. |
| 411 std::map<std::string, bool> v8_extensions_; | 405 std::map<std::string, bool> v8_extensions_; |
| 412 | 406 |
| 413 DISALLOW_COPY_AND_ASSIGN(RenderThread); | 407 DISALLOW_COPY_AND_ASSIGN(RenderThread); |
| 414 }; | 408 }; |
| 415 | 409 |
| 416 #endif // CHROME_RENDERER_RENDER_THREAD_H_ | 410 #endif // CHROME_RENDERER_RENDER_THREAD_H_ |
| OLD | NEW |