Chromium Code Reviews| Index: chrome/gpu/chrome_content_gpu_client.cc |
| diff --git a/chrome/gpu/chrome_content_gpu_client.cc b/chrome/gpu/chrome_content_gpu_client.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..572856725550949e079663666188f8422cabc2a4 |
| --- /dev/null |
| +++ b/chrome/gpu/chrome_content_gpu_client.cc |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/gpu/chrome_content_gpu_client.h" |
| + |
| +#include "content/public/common/service_registry.h" |
| + |
| +#if defined(OS_CHROMEOS) |
| +#include "chrome/gpu/gpu_arc_video_service.h" |
| +#endif |
| + |
| +#if defined(OS_CHROMEOS) |
| +namespace { |
| + |
| +void CreateGpuArcVideoService( |
| + mojo::InterfaceRequest<::arc::VideoHost> request) { |
| + // MojoProxyResolverFactoryImpl is strongly bound to the Mojo message pipe it |
|
Owen Lin
2016/03/14 08:45:52
What's a MojoProxyResolverFactory?
This one? http
kcwu
2016/03/14 12:55:49
Ah, sorry. I copied and pasted the comment without
|
| + // is connected to. When that message pipe is closed, either explicitly on the |
| + // other end (in the browser process), or by a connection error, this object |
| + // will be destroyed. |
| + new chromeos::arc::GpuArcVideoService(std::move(request)); |
| +} |
| + |
| +} // namespace |
| +#endif |
| + |
| +ChromeContentGpuClient::ChromeContentGpuClient() {} |
| + |
| +ChromeContentGpuClient::~ChromeContentGpuClient() {} |
| + |
| +void ChromeContentGpuClient::RegisterMojoServices( |
| + content::ServiceRegistry* registry) { |
| +#if defined(OS_CHROMEOS) |
| + registry->AddService<arc::VideoHost>(base::Bind(&CreateGpuArcVideoService)); |
| +#endif |
| +} |