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

Side by Side Diff: components/arc/arc_bridge_host_impl.cc

Issue 2731403007: add voice interaction shortcut. (Closed)
Patch Set: Changed mojom comments Created 3 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
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 "components/arc/arc_bridge_host_impl.h" 5 #include "components/arc/arc_bridge_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 void ArcBridgeHostImpl::OnTtsInstanceReady(mojom::TtsInstancePtr tts_ptr) { 201 void ArcBridgeHostImpl::OnTtsInstanceReady(mojom::TtsInstancePtr tts_ptr) {
202 OnInstanceReady(arc_bridge_service_->tts(), std::move(tts_ptr)); 202 OnInstanceReady(arc_bridge_service_->tts(), std::move(tts_ptr));
203 } 203 }
204 204
205 void ArcBridgeHostImpl::OnVideoInstanceReady( 205 void ArcBridgeHostImpl::OnVideoInstanceReady(
206 mojom::VideoInstancePtr video_ptr) { 206 mojom::VideoInstancePtr video_ptr) {
207 OnInstanceReady(arc_bridge_service_->video(), std::move(video_ptr)); 207 OnInstanceReady(arc_bridge_service_->video(), std::move(video_ptr));
208 } 208 }
209 209
210 void ArcBridgeHostImpl::OnVoiceInteractionArcHomeInstanceReady(
211 mojom::VoiceInteractionArcHomeInstancePtr voice_interaction_arc_home_ptr) {
212 OnInstanceReady(arc_bridge_service_->voice_interaction_home(),
213 std::move(voice_interaction_arc_home_ptr));
214 }
215
216 void ArcBridgeHostImpl::OnVoiceInteractionCaptureInstanceReady(
217 mojom::VoiceInteractionCaptureInstancePtr voice_interaction_capture_ptr) {
218 OnInstanceReady(arc_bridge_service_->voice_interaction_capture(),
219 std::move(voice_interaction_capture_ptr));
220 }
221
210 void ArcBridgeHostImpl::OnWallpaperInstanceReady( 222 void ArcBridgeHostImpl::OnWallpaperInstanceReady(
211 mojom::WallpaperInstancePtr wallpaper_ptr) { 223 mojom::WallpaperInstancePtr wallpaper_ptr) {
212 OnInstanceReady(arc_bridge_service_->wallpaper(), std::move(wallpaper_ptr)); 224 OnInstanceReady(arc_bridge_service_->wallpaper(), std::move(wallpaper_ptr));
213 } 225 }
214 226
215 void ArcBridgeHostImpl::OnClosed() { 227 void ArcBridgeHostImpl::OnClosed() {
216 DCHECK(thread_checker_.CalledOnValidThread()); 228 DCHECK(thread_checker_.CalledOnValidThread());
217 VLOG(1) << "Mojo connection lost"; 229 VLOG(1) << "Mojo connection lost";
218 230
219 // Close all mojo channels. 231 // Close all mojo channels.
(...skipping 30 matching lines...) Expand all
250 void ArcBridgeHostImpl::OnChannelClosed(MojoChannel* channel) { 262 void ArcBridgeHostImpl::OnChannelClosed(MojoChannel* channel) {
251 DCHECK(thread_checker_.CalledOnValidThread()); 263 DCHECK(thread_checker_.CalledOnValidThread());
252 mojo_channels_.erase( 264 mojo_channels_.erase(
253 std::find_if(mojo_channels_.begin(), mojo_channels_.end(), 265 std::find_if(mojo_channels_.begin(), mojo_channels_.end(),
254 [channel](std::unique_ptr<MojoChannel>& ptr) { 266 [channel](std::unique_ptr<MojoChannel>& ptr) {
255 return ptr.get() == channel; 267 return ptr.get() == channel;
256 })); 268 }));
257 } 269 }
258 270
259 } // namespace arc 271 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698