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

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

Issue 2599673005: arc: Use GET_INTERFACE_FOR_METHOD macro (Closed)
Patch Set: Addressed feedback Created 3 years, 11 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 GpuArcVideoServiceHost::~GpuArcVideoServiceHost() { 67 GpuArcVideoServiceHost::~GpuArcVideoServiceHost() {
68 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 68 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
69 arc_bridge_service()->video()->RemoveObserver(this); 69 arc_bridge_service()->video()->RemoveObserver(this);
70 } 70 }
71 71
72 void GpuArcVideoServiceHost::OnInstanceReady() { 72 void GpuArcVideoServiceHost::OnInstanceReady() {
73 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 73 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
74 auto* video_instance = 74 auto* video_instance =
75 arc_bridge_service()->video()->GetInstanceForMethod("Init"); 75 ARC_GET_INSTANCE_FOR_METHOD(arc_bridge_service()->video(), Init);
76 DCHECK(video_instance); 76 DCHECK(video_instance);
77 video_instance->Init(binding_.CreateInterfacePtrAndBind()); 77 video_instance->Init(binding_.CreateInterfacePtrAndBind());
78 } 78 }
79 79
80 void GpuArcVideoServiceHost::DeprecatedOnRequestArcVideoAcceleratorChannel( 80 void GpuArcVideoServiceHost::DeprecatedOnRequestArcVideoAcceleratorChannel(
81 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback) { 81 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback) {
82 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 82 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
83 83
84 // Hardcode pid 0 since it is unused in mojo. 84 // Hardcode pid 0 since it is unused in mojo.
85 const base::ProcessHandle kUnusedChildProcessHandle = 85 const base::ProcessHandle kUnusedChildProcessHandle =
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return; 148 return;
149 } 149 }
150 callback.Run(std::move(child_handle), token); 150 callback.Run(std::move(child_handle), token);
151 151
152 mojo::MakeStrongBinding(base::MakeUnique<VideoAcceleratorFactoryService>(), 152 mojo::MakeStrongBinding(base::MakeUnique<VideoAcceleratorFactoryService>(),
153 mojo::MakeRequest<mojom::VideoAcceleratorFactory>( 153 mojo::MakeRequest<mojom::VideoAcceleratorFactory>(
154 std::move(server_pipe))); 154 std::move(server_pipe)));
155 } 155 }
156 156
157 } // namespace arc 157 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/tts/arc_tts_service.cc ('k') | chrome/browser/chromeos/arc/wallpaper/arc_wallpaper_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698