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