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

Side by Side Diff: chrome/browser/chromeos/arc/video/gpu_arc_video_service_host.cc

Issue 2766263009: Convert content ConnectionFilter to OnBindInterface (Closed)
Patch Set: . Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/chromeos/arc/video/gpu_arc_video_service_host.h" 5 #include "chrome/browser/chromeos/arc/video/gpu_arc_video_service_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 10 matching lines...) Expand all
21 #include "mojo/edk/embedder/platform_channel_pair.h" 21 #include "mojo/edk/embedder/platform_channel_pair.h"
22 #include "mojo/public/cpp/bindings/strong_binding.h" 22 #include "mojo/public/cpp/bindings/strong_binding.h"
23 #include "services/service_manager/public/cpp/interface_provider.h" 23 #include "services/service_manager/public/cpp/interface_provider.h"
24 24
25 namespace arc { 25 namespace arc {
26 26
27 namespace { 27 namespace {
28 28
29 void ConnectToVideoAcceleratorServiceOnIOThread( 29 void ConnectToVideoAcceleratorServiceOnIOThread(
30 mojom::VideoAcceleratorServiceRequest request) { 30 mojom::VideoAcceleratorServiceRequest request) {
31 content::GetGpuRemoteInterfaces()->GetInterface(std::move(request)); 31 content::BindInterfaceInGpuProcess(std::move(request));
32 } 32 }
33 33
34 } // namespace 34 } // namespace
35 35
36 class VideoAcceleratorFactoryService : public mojom::VideoAcceleratorFactory { 36 class VideoAcceleratorFactoryService : public mojom::VideoAcceleratorFactory {
37 public: 37 public:
38 VideoAcceleratorFactoryService() = default; 38 VideoAcceleratorFactoryService() = default;
39 39
40 void Create(mojom::VideoAcceleratorServiceRequest request) override { 40 void Create(mojom::VideoAcceleratorServiceRequest request) override {
41 content::BrowserThread::PostTask( 41 content::BrowserThread::PostTask(
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 std::string token; 92 std::string token;
93 mojo::ScopedMessagePipeHandle server_pipe = process.CreateMessagePipe(&token); 93 mojo::ScopedMessagePipeHandle server_pipe = process.CreateMessagePipe(&token);
94 callback.Run(std::move(child_handle), token); 94 callback.Run(std::move(child_handle), token);
95 95
96 mojo::MakeStrongBinding(base::MakeUnique<VideoAcceleratorFactoryService>(), 96 mojo::MakeStrongBinding(base::MakeUnique<VideoAcceleratorFactoryService>(),
97 mojo::MakeRequest<mojom::VideoAcceleratorFactory>( 97 mojo::MakeRequest<mojom::VideoAcceleratorFactory>(
98 std::move(server_pipe))); 98 std::move(server_pipe)));
99 } 99 }
100 100
101 } // namespace arc 101 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/importer/external_process_importer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698