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

Side by Side Diff: chrome/gpu/chrome_content_gpu_client.cc

Issue 1641353003: GpuArcVideoService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arc-4-owen-ArcGpuVideoDecodeAccelerator
Patch Set: modify content gui client hook Created 4 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/gpu/chrome_content_gpu_client.h"
6
7 #include "content/public/common/service_registry.h"
8
9 #if defined(OS_CHROMEOS)
10 #include "chrome/gpu/gpu_arc_video_service.h"
11 #include "gpu/command_buffer/service/gpu_preferences.h"
12 #endif
13
14 #if defined(OS_CHROMEOS)
15 namespace {
16
17 void CreateGpuArcVideoService(
18 const gpu::GpuPreferences& gpu_preferences,
19 mojo::InterfaceRequest<::arc::VideoHost> request) {
20 // GpuArcVideoService is strongly bound to the Mojo message pipe it
21 // is connected to. When that message pipe is closed, either explicitly on the
22 // other end (in the browser process), or by a connection error, this object
23 // will be destroyed.
24 new chromeos::arc::GpuArcVideoService(std::move(request), gpu_preferences);
25 }
26
27 } // namespace
28 #endif
29
30 ChromeContentGpuClient::ChromeContentGpuClient() {}
31
32 ChromeContentGpuClient::~ChromeContentGpuClient() {}
33
34 void ChromeContentGpuClient::RegisterMojoServices(
35 content::ServiceRegistry* registry,
36 const gpu::GpuPreferences& gpu_preferences) {
37 #if defined(OS_CHROMEOS)
38 registry->AddService(base::Bind(&CreateGpuArcVideoService, gpu_preferences));
39 #endif
40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698