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

Side by Side Diff: chromeos/audio/audio_device.h

Issue 795393002: [Hotword] Implement IsHotwordHardwareAvailable() using device types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix failures due to double init of cras audio handler Created 6 years 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
« no previous file with comments | « chrome/browser/search/hotword_service_factory.cc ('k') | chromeos/audio/audio_device.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICE_H_ 5 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICE_H_
6 #define CHROMEOS_AUDIO_AUDIO_DEVICE_H_ 6 #define CHROMEOS_AUDIO_AUDIO_DEVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "chromeos/chromeos_export.h" 13 #include "chromeos/chromeos_export.h"
14 #include "chromeos/dbus/audio_node.h" 14 #include "chromeos/dbus/audio_node.h"
15 15
16 namespace chromeos { 16 namespace chromeos {
17 17
18 // Ordered from the highest priority to the lowest. 18 // Ordered from the highest priority to the lowest.
19 enum AudioDeviceType { 19 enum AudioDeviceType {
20 AUDIO_TYPE_HEADPHONE, 20 AUDIO_TYPE_HEADPHONE,
21 AUDIO_TYPE_MIC, 21 AUDIO_TYPE_MIC,
22 AUDIO_TYPE_USB, 22 AUDIO_TYPE_USB,
23 AUDIO_TYPE_BLUETOOTH, 23 AUDIO_TYPE_BLUETOOTH,
24 AUDIO_TYPE_HDMI, 24 AUDIO_TYPE_HDMI,
25 AUDIO_TYPE_INTERNAL_SPEAKER, 25 AUDIO_TYPE_INTERNAL_SPEAKER,
26 AUDIO_TYPE_INTERNAL_MIC, 26 AUDIO_TYPE_INTERNAL_MIC,
27 AUDIO_TYPE_KEYBOARD_MIC, 27 AUDIO_TYPE_KEYBOARD_MIC,
28 AUDIO_TYPE_AOKR,
28 AUDIO_TYPE_OTHER, 29 AUDIO_TYPE_OTHER,
29 }; 30 };
30 31
31 struct CHROMEOS_EXPORT AudioDevice { 32 struct CHROMEOS_EXPORT AudioDevice {
32 AudioDevice(); 33 AudioDevice();
33 explicit AudioDevice(const AudioNode& node); 34 explicit AudioDevice(const AudioNode& node);
34 std::string ToString() const; 35 std::string ToString() const;
35 36
36 // Converts between the string type sent via D-Bus and AudioDeviceType. 37 // Converts between the string type sent via D-Bus and AudioDeviceType.
37 // Static so they can be used by tests. 38 // Static so they can be used by tests.
(...skipping 30 matching lines...) Expand all
68 return true; 69 return true;
69 } else { 70 } else {
70 return false; 71 return false;
71 } 72 }
72 } 73 }
73 }; 74 };
74 75
75 } // namespace chromeos 76 } // namespace chromeos
76 77
77 #endif // CHROMEOS_AUDIO_AUDIO_DEVICE_H_ 78 #endif // CHROMEOS_AUDIO_AUDIO_DEVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/search/hotword_service_factory.cc ('k') | chromeos/audio/audio_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698