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

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

Issue 1885683005: Add module suffix in .mojom files for components/arc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase only Created 4 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 "components/arc/audio/arc_audio_bridge.h" 5 #include "components/arc/audio/arc_audio_bridge.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chromeos/audio/audio_device.h" 8 #include "chromeos/audio/audio_device.h"
9 9
10 namespace arc { 10 namespace arc {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 VLOG(1) << "HEADPHONE " << headphone_inserted 43 VLOG(1) << "HEADPHONE " << headphone_inserted
44 << " MICROPHONE " << microphone_inserted; 44 << " MICROPHONE " << microphone_inserted;
45 SendSwitchState(headphone_inserted, microphone_inserted); 45 SendSwitchState(headphone_inserted, microphone_inserted);
46 } 46 }
47 47
48 void ArcAudioBridge::SendSwitchState(bool headphone_inserted, 48 void ArcAudioBridge::SendSwitchState(bool headphone_inserted,
49 bool microphone_inserted) { 49 bool microphone_inserted) {
50 uint32_t switch_state = 0; 50 uint32_t switch_state = 0;
51 if (headphone_inserted) { 51 if (headphone_inserted) {
52 switch_state |= 52 switch_state |=
53 (1 << static_cast<uint32_t>(AudioSwitch::SW_HEADPHONE_INSERT)); 53 (1 << static_cast<uint32_t>(mojom::AudioSwitch::SW_HEADPHONE_INSERT));
54 } 54 }
55 if (microphone_inserted) { 55 if (microphone_inserted) {
56 switch_state |= 56 switch_state |=
57 (1 << static_cast<uint32_t>(AudioSwitch::SW_MICROPHONE_INSERT)); 57 (1 << static_cast<uint32_t>(mojom::AudioSwitch::SW_MICROPHONE_INSERT));
58 } 58 }
59 59
60 VLOG(1) << "Send switch state " << switch_state; 60 VLOG(1) << "Send switch state " << switch_state;
61 AudioInstance* audio_instance = arc_bridge_service()->audio_instance(); 61 mojom::AudioInstance* audio_instance = arc_bridge_service()->audio_instance();
62 if (audio_instance) 62 if (audio_instance)
63 audio_instance->NotifySwitchState(switch_state); 63 audio_instance->NotifySwitchState(switch_state);
64 } 64 }
65 65
66 } // namespace arc 66 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/arc_bridge_service_impl.cc ('k') | components/arc/bluetooth/arc_bluetooth_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698