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

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

Issue 2382103002: media: Add GpuMojoMediaClient. (Closed)
Patch Set: Created 4 years, 2 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
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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 gpu_channel_manager_.reset(new gpu::GpuChannelManager( 355 gpu_channel_manager_.reset(new gpu::GpuChannelManager(
356 gpu_preferences, this, watchdog_thread_.get(), 356 gpu_preferences, this, watchdog_thread_.get(),
357 base::ThreadTaskRunnerHandle::Get().get(), 357 base::ThreadTaskRunnerHandle::Get().get(),
358 ChildProcess::current()->io_task_runner(), 358 ChildProcess::current()->io_task_runner(),
359 ChildProcess::current()->GetShutDownEvent(), sync_point_manager, 359 ChildProcess::current()->GetShutDownEvent(), sync_point_manager,
360 gpu_memory_buffer_factory_)); 360 gpu_memory_buffer_factory_));
361 361
362 media_service_.reset(new media::MediaService(gpu_channel_manager_.get())); 362 media_service_.reset(new media::MediaService(gpu_channel_manager_.get()));
363 363
364 // Only set once per process instance. 364 // Only set once per process instance.
365 service_factory_.reset(new GpuServiceFactory); 365 service_factory_.reset(new GpuServiceFactory(
366 base::ThreadTaskRunnerHandle::Get(), media_service_.get()));
366 367
367 GetInterfaceRegistry()->AddInterface(base::Bind( 368 GetInterfaceRegistry()->AddInterface(base::Bind(
368 &GpuChildThread::BindServiceFactoryRequest, base::Unretained(this))); 369 &GpuChildThread::BindServiceFactoryRequest, base::Unretained(this)));
369 370
370 if (GetContentClient()->gpu()) { // NULL in tests. 371 if (GetContentClient()->gpu()) { // NULL in tests.
371 GetContentClient()->gpu()->ExposeInterfacesToBrowser(GetInterfaceRegistry(), 372 GetContentClient()->gpu()->ExposeInterfacesToBrowser(GetInterfaceRegistry(),
372 gpu_preferences); 373 gpu_preferences);
373 GetContentClient()->gpu()->ConsumeInterfacesFromBrowser( 374 GetContentClient()->gpu()->ConsumeInterfacesFromBrowser(
374 GetRemoteInterfaces()); 375 GetRemoteInterfaces());
375 } 376 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 545
545 void GpuChildThread::BindServiceFactoryRequest( 546 void GpuChildThread::BindServiceFactoryRequest(
546 shell::mojom::ServiceFactoryRequest request) { 547 shell::mojom::ServiceFactoryRequest request) {
547 DVLOG(1) << "GPU: Binding shell::mojom::ServiceFactoryRequest"; 548 DVLOG(1) << "GPU: Binding shell::mojom::ServiceFactoryRequest";
548 DCHECK(service_factory_); 549 DCHECK(service_factory_);
549 service_factory_bindings_.AddBinding(service_factory_.get(), 550 service_factory_bindings_.AddBinding(service_factory_.get(),
550 std::move(request)); 551 std::move(request));
551 } 552 }
552 553
553 } // namespace content 554 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/gpu/gpu_service_factory.h » ('j') | media/mojo/services/mojo_media_application_factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698