| 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 #include "content/gpu/gpu_child_thread.h" | 5 #include "content/gpu/gpu_child_thread.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/threading/worker_pool.h" | 9 #include "base/threading/worker_pool.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 deferred_messages_(deferred_messages), | 54 deferred_messages_(deferred_messages), |
| 55 in_browser_process_(false) { | 55 in_browser_process_(false) { |
| 56 watchdog_thread_ = watchdog_thread; | 56 watchdog_thread_ = watchdog_thread; |
| 57 #if defined(OS_WIN) | 57 #if defined(OS_WIN) |
| 58 target_services_ = NULL; | 58 target_services_ = NULL; |
| 59 #endif | 59 #endif |
| 60 g_thread_safe_sender.Get() = thread_safe_sender(); | 60 g_thread_safe_sender.Get() = thread_safe_sender(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 GpuChildThread::GpuChildThread(const std::string& channel_id) | 63 GpuChildThread::GpuChildThread(const std::string& channel_id) |
| 64 : ChildThread(channel_id), | 64 : ChildThread(Options(channel_id, false)), |
| 65 dead_on_arrival_(false), | 65 dead_on_arrival_(false), |
| 66 in_browser_process_(true) { | 66 in_browser_process_(true) { |
| 67 #if defined(OS_WIN) | 67 #if defined(OS_WIN) |
| 68 target_services_ = NULL; | 68 target_services_ = NULL; |
| 69 #endif | 69 #endif |
| 70 DCHECK( | 70 DCHECK( |
| 71 CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess) || | 71 CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess) || |
| 72 CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU)); | 72 CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU)); |
| 73 #if !defined(OS_ANDROID) | 73 #if !defined(OS_ANDROID) |
| 74 // For single process and in-process GPU mode, we need to load and | 74 // For single process and in-process GPU mode, we need to load and |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 // the future posting of tasks to the message loop. | 256 // the future posting of tasks to the message loop. |
| 257 if (watchdog_thread_->message_loop()) | 257 if (watchdog_thread_->message_loop()) |
| 258 watchdog_thread_->PostAcknowledge(); | 258 watchdog_thread_->PostAcknowledge(); |
| 259 // Prevent rearming. | 259 // Prevent rearming. |
| 260 watchdog_thread_->Stop(); | 260 watchdog_thread_->Stop(); |
| 261 } | 261 } |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace content | 264 } // namespace content |
| 265 | 265 |
| OLD | NEW |