OLD | NEW |
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 #include "chromeos/audio/audio_device.h" | 5 #include "chromeos/audio/audio_device.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 display_name = node.name; | 125 display_name = node.name; |
126 else | 126 else |
127 display_name = node.device_name; | 127 display_name = node.device_name; |
128 device_name = node.device_name; | 128 device_name = node.device_name; |
129 mic_positions = node.mic_positions; | 129 mic_positions = node.mic_positions; |
130 priority = GetDevicePriority(type, node.is_input); | 130 priority = GetDevicePriority(type, node.is_input); |
131 active = node.active; | 131 active = node.active; |
132 plugged_time = node.plugged_time; | 132 plugged_time = node.plugged_time; |
133 } | 133 } |
134 | 134 |
| 135 AudioDevice::AudioDevice(const AudioDevice& other) = default; |
| 136 |
135 std::string AudioDevice::ToString() const { | 137 std::string AudioDevice::ToString() const { |
136 std::string result; | 138 std::string result; |
137 base::StringAppendF(&result, | 139 base::StringAppendF(&result, |
138 "is_input = %s ", | 140 "is_input = %s ", |
139 is_input ? "true" : "false"); | 141 is_input ? "true" : "false"); |
140 base::StringAppendF(&result, | 142 base::StringAppendF(&result, |
141 "id = 0x%" PRIx64 " ", | 143 "id = 0x%" PRIx64 " ", |
142 id); | 144 id); |
143 base::StringAppendF(&result, | 145 base::StringAppendF(&result, |
144 "stable_device_id = 0x%" PRIx64 " ", | 146 "stable_device_id = 0x%" PRIx64 " ", |
(...skipping 12 matching lines...) Expand all Loading... |
157 active ? "true" : "false"); | 159 active ? "true" : "false"); |
158 base::StringAppendF(&result, | 160 base::StringAppendF(&result, |
159 "plugged_time= %s ", | 161 "plugged_time= %s ", |
160 base::Uint64ToString(plugged_time).c_str()); | 162 base::Uint64ToString(plugged_time).c_str()); |
161 base::StringAppendF(&result, "mic_positions = %s ", mic_positions.c_str()); | 163 base::StringAppendF(&result, "mic_positions = %s ", mic_positions.c_str()); |
162 | 164 |
163 return result; | 165 return result; |
164 } | 166 } |
165 | 167 |
166 } // namespace chromeos | 168 } // namespace chromeos |
OLD | NEW |