Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: content/gpu/gpu_child_thread.cc

Issue 198073003: Remove some content_child dependency from content_common (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ffd442cb fix for bots barfing on clang style checks Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 logging::SetLogMessageHandler(GpuProcessLogMessageHandler); 143 logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
144 144
145 // Record initialization only after collecting the GPU info because that can 145 // Record initialization only after collecting the GPU info because that can
146 // take a significant amount of time. 146 // take a significant amount of time.
147 gpu_info_.initialization_time = base::Time::Now() - process_start_time_; 147 gpu_info_.initialization_time = base::Time::Now() - process_start_time_;
148 148
149 // Defer creation of the render thread. This is to prevent it from handling 149 // Defer creation of the render thread. This is to prevent it from handling
150 // IPC messages before the sandbox has been enabled and all other necessary 150 // IPC messages before the sandbox has been enabled and all other necessary
151 // initialization has succeeded. 151 // initialization has succeeded.
152 gpu_channel_manager_.reset( 152 gpu_channel_manager_.reset(
153 new GpuChannelManager(this, 153 new GpuChannelManager(GetRouter(),
154 watchdog_thread_.get(), 154 watchdog_thread_.get(),
155 ChildProcess::current()->io_message_loop_proxy(), 155 ChildProcess::current()->io_message_loop_proxy(),
156 ChildProcess::current()->GetShutDownEvent())); 156 ChildProcess::current()->GetShutDownEvent()));
157 157
158 // Ensure the browser process receives the GPU info before a reply to any 158 // Ensure the browser process receives the GPU info before a reply to any
159 // subsequent IPC it might send. 159 // subsequent IPC it might send.
160 if (!in_browser_process_) 160 if (!in_browser_process_)
161 Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_)); 161 Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_));
162 } 162 }
163 163
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // the future posting of tasks to the message loop. 234 // the future posting of tasks to the message loop.
235 if (watchdog_thread_->message_loop()) 235 if (watchdog_thread_->message_loop())
236 watchdog_thread_->PostAcknowledge(); 236 watchdog_thread_->PostAcknowledge();
237 // Prevent rearming. 237 // Prevent rearming.
238 watchdog_thread_->Stop(); 238 watchdog_thread_->Stop();
239 } 239 }
240 } 240 }
241 241
242 } // namespace content 242 } // namespace content
243 243
OLDNEW
« no previous file with comments | « content/common/gpu/media/vaapi_video_decode_accelerator.cc ('k') | content/renderer/pepper/ppb_broker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698