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

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

Issue 1292263003: ipc: Use a global for the process's attachment broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_message2
Patch Set: Comments from avi. Created 5 years, 3 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
« no previous file with comments | « content/common/gpu/gpu_channel_test_common.cc ('k') | content/plugin/plugin_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 if (!in_browser_process_) 254 if (!in_browser_process_)
255 logging::SetLogMessageHandler(GpuProcessLogMessageHandler); 255 logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
256 256
257 // Defer creation of the render thread. This is to prevent it from handling 257 // Defer creation of the render thread. This is to prevent it from handling
258 // IPC messages before the sandbox has been enabled and all other necessary 258 // IPC messages before the sandbox has been enabled and all other necessary
259 // initialization has succeeded. 259 // initialization has succeeded.
260 gpu_channel_manager_.reset(new GpuChannelManager( 260 gpu_channel_manager_.reset(new GpuChannelManager(
261 channel(), watchdog_thread_.get(), 261 channel(), watchdog_thread_.get(),
262 base::ThreadTaskRunnerHandle::Get().get(), 262 base::ThreadTaskRunnerHandle::Get().get(),
263 ChildProcess::current()->io_task_runner(), 263 ChildProcess::current()->io_task_runner(),
264 ChildProcess::current()->GetShutDownEvent(), GetAttachmentBroker(), 264 ChildProcess::current()->GetShutDownEvent(),
265 sync_point_manager_, gpu_memory_buffer_factory_)); 265 sync_point_manager_, gpu_memory_buffer_factory_));
266 266
267 #if defined(USE_OZONE) 267 #if defined(USE_OZONE)
268 ui::OzonePlatform::GetInstance() 268 ui::OzonePlatform::GetInstance()
269 ->GetGpuPlatformSupport() 269 ->GetGpuPlatformSupport()
270 ->OnChannelEstablished(this); 270 ->OnChannelEstablished(this);
271 #endif 271 #endif
272 } 272 }
273 273
274 void GpuChildThread::OnFinalize() { 274 void GpuChildThread::OnFinalize() {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 368 }
369 } 369 }
370 370
371 void GpuChildThread::OnGpuSwitched() { 371 void GpuChildThread::OnGpuSwitched() {
372 DVLOG(1) << "GPU: GPU has switched"; 372 DVLOG(1) << "GPU: GPU has switched";
373 // Notify observers in the GPU process. 373 // Notify observers in the GPU process.
374 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched(); 374 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched();
375 } 375 }
376 376
377 } // namespace content 377 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_test_common.cc ('k') | content/plugin/plugin_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698