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

Side by Side Diff: components/arc/audio/arc_audio_bridge.cc

Issue 2098023002: mash: Migrate remaining tray observers and notify functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 years, 6 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/audio/arc_audio_bridge.h" 5 #include "components/arc/audio/arc_audio_bridge.h"
6 6
7 #include "ash/common/system/tray/wm_system_tray_notifier.h" 7 #include "ash/common/system/tray/system_tray_notifier.h"
8 #include "ash/common/wm_shell.h" 8 #include "ash/common/wm_shell.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chromeos/audio/audio_device.h" 10 #include "chromeos/audio/audio_device.h"
11 11
12 namespace arc { 12 namespace arc {
13 13
14 ArcAudioBridge::ArcAudioBridge(ArcBridgeService* bridge_service) 14 ArcAudioBridge::ArcAudioBridge(ArcBridgeService* bridge_service)
15 : ArcService(bridge_service), binding_(this) { 15 : ArcService(bridge_service), binding_(this) {
16 arc_bridge_service()->AddObserver(this); 16 arc_bridge_service()->AddObserver(this);
17 if (chromeos::CrasAudioHandler::IsInitialized()) { 17 if (chromeos::CrasAudioHandler::IsInitialized()) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 (1 << static_cast<uint32_t>(mojom::AudioSwitch::SW_MICROPHONE_INSERT)); 80 (1 << static_cast<uint32_t>(mojom::AudioSwitch::SW_MICROPHONE_INSERT));
81 } 81 }
82 82
83 VLOG(1) << "Send switch state " << switch_state; 83 VLOG(1) << "Send switch state " << switch_state;
84 mojom::AudioInstance* audio_instance = arc_bridge_service()->audio_instance(); 84 mojom::AudioInstance* audio_instance = arc_bridge_service()->audio_instance();
85 if (audio_instance) 85 if (audio_instance)
86 audio_instance->NotifySwitchState(switch_state); 86 audio_instance->NotifySwitchState(switch_state);
87 } 87 }
88 88
89 } // namespace arc 89 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698