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

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

Issue 2096643002: Eliminate MojoApplicationHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mah3
Patch Set: . Created 4 years, 5 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/content_resources.gypi ('k') | content/public/app/BUILD.gn » ('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 <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // ChromeBrowserMainPartsAndroid::PreMainMessageLoopRun(). 229 // ChromeBrowserMainPartsAndroid::PreMainMessageLoopRun().
230 if (!in_browser_process_) 230 if (!in_browser_process_)
231 media::SetMediaClientAndroid(GetContentClient()->GetMediaClientAndroid()); 231 media::SetMediaClientAndroid(GetContentClient()->GetMediaClientAndroid());
232 #endif 232 #endif
233 233
234 // Only set once per process instance. 234 // Only set once per process instance.
235 process_control_.reset(new GpuProcessControlImpl()); 235 process_control_.reset(new GpuProcessControlImpl());
236 236
237 // Use of base::Unretained(this) is safe here because |service_registry()| 237 // Use of base::Unretained(this) is safe here because |service_registry()|
238 // will be destroyed before GpuChildThread is destructed. 238 // will be destroyed before GpuChildThread is destructed.
239 interface_registry()->AddInterface(base::Bind( 239 GetInterfaceRegistry()->AddInterface(base::Bind(
240 &GpuChildThread::BindProcessControlRequest, base::Unretained(this))); 240 &GpuChildThread::BindProcessControlRequest, base::Unretained(this)));
241 241
242 if (GetContentClient()->gpu()) { // NULL in tests. 242 if (GetContentClient()->gpu()) { // NULL in tests.
243 GetContentClient()->gpu()->Initialize(this); 243 GetContentClient()->gpu()->Initialize(this);
244 GetContentClient()->gpu()->RegisterMojoInterfaces(interface_registry()); 244 GetContentClient()->gpu()->RegisterMojoInterfaces(GetInterfaceRegistry());
245 } 245 }
246 } 246 }
247 247
248 void GpuChildThread::OnFieldTrialGroupFinalized(const std::string& trial_name, 248 void GpuChildThread::OnFieldTrialGroupFinalized(const std::string& trial_name,
249 const std::string& group_name) { 249 const std::string& group_name) {
250 Send(new GpuHostMsg_FieldTrialActivated(trial_name)); 250 Send(new GpuHostMsg_FieldTrialActivated(trial_name));
251 } 251 }
252 252
253 bool GpuChildThread::Send(IPC::Message* msg) { 253 bool GpuChildThread::Send(IPC::Message* msg) {
254 // The GPU process must never send a synchronous IPC message to the browser 254 // The GPU process must never send a synchronous IPC message to the browser
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 570
571 void GpuChildThread::BindProcessControlRequest( 571 void GpuChildThread::BindProcessControlRequest(
572 mojo::InterfaceRequest<mojom::ProcessControl> request) { 572 mojo::InterfaceRequest<mojom::ProcessControl> request) {
573 DVLOG(1) << "GPU: Binding ProcessControl request"; 573 DVLOG(1) << "GPU: Binding ProcessControl request";
574 DCHECK(process_control_); 574 DCHECK(process_control_);
575 process_control_bindings_.AddBinding(process_control_.get(), 575 process_control_bindings_.AddBinding(process_control_.get(),
576 std::move(request)); 576 std::move(request));
577 } 577 }
578 578
579 } // namespace content 579 } // namespace content
OLDNEW
« no previous file with comments | « content/content_resources.gypi ('k') | content/public/app/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698