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

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

Issue 2099063002: Migrate RenderProcessHost, ChildThread to InterfaceRegistry/Provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/child/mojo/mojo_application.h ('k') | content/public/browser/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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // ChromeBrowserMainPartsAndroid::PreMainMessageLoopRun(). 215 // ChromeBrowserMainPartsAndroid::PreMainMessageLoopRun().
216 if (!in_browser_process_) 216 if (!in_browser_process_)
217 media::SetMediaClientAndroid(GetContentClient()->GetMediaClientAndroid()); 217 media::SetMediaClientAndroid(GetContentClient()->GetMediaClientAndroid());
218 #endif 218 #endif
219 219
220 // Only set once per process instance. 220 // Only set once per process instance.
221 process_control_.reset(new GpuProcessControlImpl()); 221 process_control_.reset(new GpuProcessControlImpl());
222 222
223 // Use of base::Unretained(this) is safe here because |service_registry()| 223 // Use of base::Unretained(this) is safe here because |service_registry()|
224 // will be destroyed before GpuChildThread is destructed. 224 // will be destroyed before GpuChildThread is destructed.
225 interface_registry()->AddInterface(base::Bind( 225 GetInterfaceRegistry()->AddInterface(base::Bind(
226 &GpuChildThread::BindProcessControlRequest, base::Unretained(this))); 226 &GpuChildThread::BindProcessControlRequest, base::Unretained(this)));
227 227
228 if (GetContentClient()->gpu()) { // NULL in tests. 228 if (GetContentClient()->gpu()) { // NULL in tests.
229 GetContentClient()->gpu()->Initialize(this); 229 GetContentClient()->gpu()->Initialize(this);
230 GetContentClient()->gpu()->RegisterMojoInterfaces(interface_registry()); 230 GetContentClient()->gpu()->ExposeInterfacesToBrowser(
231 GetInterfaceRegistry());
231 } 232 }
232 } 233 }
233 234
234 void GpuChildThread::OnFieldTrialGroupFinalized(const std::string& trial_name, 235 void GpuChildThread::OnFieldTrialGroupFinalized(const std::string& trial_name,
235 const std::string& group_name) { 236 const std::string& group_name) {
236 Send(new GpuHostMsg_FieldTrialActivated(trial_name)); 237 Send(new GpuHostMsg_FieldTrialActivated(trial_name));
237 } 238 }
238 239
239 bool GpuChildThread::Send(IPC::Message* msg) { 240 bool GpuChildThread::Send(IPC::Message* msg) {
240 // The GPU process must never send a synchronous IPC message to the browser 241 // 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
556 557
557 void GpuChildThread::BindProcessControlRequest( 558 void GpuChildThread::BindProcessControlRequest(
558 mojo::InterfaceRequest<mojom::ProcessControl> request) { 559 mojo::InterfaceRequest<mojom::ProcessControl> request) {
559 DVLOG(1) << "GPU: Binding ProcessControl request"; 560 DVLOG(1) << "GPU: Binding ProcessControl request";
560 DCHECK(process_control_); 561 DCHECK(process_control_);
561 process_control_bindings_.AddBinding(process_control_.get(), 562 process_control_bindings_.AddBinding(process_control_.get(),
562 std::move(request)); 563 std::move(request));
563 } 564 }
564 565
565 } // namespace content 566 } // namespace content
OLDNEW
« no previous file with comments | « content/child/mojo/mojo_application.h ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698