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

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

Issue 1380103003: Store audio device's active state in preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix string format Created 4 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
« no previous file with comments | « no previous file | 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return (type == AUDIO_TYPE_HEADPHONE || 50 return (type == AUDIO_TYPE_HEADPHONE ||
51 type == AUDIO_TYPE_INTERNAL_MIC || 51 type == AUDIO_TYPE_INTERNAL_MIC ||
52 type == AUDIO_TYPE_MIC || 52 type == AUDIO_TYPE_MIC ||
53 type == AUDIO_TYPE_USB || 53 type == AUDIO_TYPE_USB ||
54 type == AUDIO_TYPE_BLUETOOTH || 54 type == AUDIO_TYPE_BLUETOOTH ||
55 type == AUDIO_TYPE_HDMI || 55 type == AUDIO_TYPE_HDMI ||
56 type == AUDIO_TYPE_INTERNAL_SPEAKER); 56 type == AUDIO_TYPE_INTERNAL_SPEAKER);
57 } 57 }
58 58
59 bool is_input; 59 bool is_input;
60
61 // Id of this audio device. The legacy |id| is assigned to be unique everytime
62 // when each device got plugged, so that the same physical device will have
63 // a different id after unplug then re-plug.
64 // The |stable_device_id| is designed to be persistent across system reboot
65 // and plug/unplug for the same physical device. It is guaranteed that
66 // different type of hardware has different |stable_device_id|, but not
67 // guaranteed to be different between the same kind of audio device, e.g
68 // USB headset. |id| and |stable_device_id| can be used together to achieve
69 // various goals.
60 uint64_t id; 70 uint64_t id;
71 uint64_t stable_device_id;
61 std::string display_name; 72 std::string display_name;
62 std::string device_name; 73 std::string device_name;
63 std::string mic_positions; 74 std::string mic_positions;
64 AudioDeviceType type; 75 AudioDeviceType type;
65 uint8_t priority; 76 uint8_t priority;
66 bool active; 77 bool active;
67 uint64_t plugged_time; 78 uint64_t plugged_time;
68 }; 79 };
69 80
70 typedef std::vector<AudioDevice> AudioDeviceList; 81 typedef std::vector<AudioDevice> AudioDeviceList;
(...skipping 16 matching lines...) Expand all
87 return true; 98 return true;
88 } else { 99 } else {
89 return false; 100 return false;
90 } 101 }
91 } 102 }
92 }; 103 };
93 104
94 } // namespace chromeos 105 } // namespace chromeos
95 106
96 #endif // CHROMEOS_AUDIO_AUDIO_DEVICE_H_ 107 #endif // CHROMEOS_AUDIO_AUDIO_DEVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/audio/audio_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698