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