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

Unified Diff: chromeos/audio/audio_device.cc

Issue 515573003: app_shell: Do simple audio initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add tests Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/audio/audio_device.cc
diff --git a/chromeos/audio/audio_device.cc b/chromeos/audio/audio_device.cc
index 1a9169a0b5af22260cef6022b09522f1e837b9e2..0232fa5a3d2c48eddfef29994c0ac81dd87f0714 100644
--- a/chromeos/audio/audio_device.cc
+++ b/chromeos/audio/audio_device.cc
@@ -35,7 +35,12 @@ uint8 GetDevicePriority(chromeos::AudioDeviceType type) {
}
}
-std::string GetTypeString(chromeos::AudioDeviceType type) {
+} // namespace
+
+namespace chromeos {
+
+// static
+std::string AudioDevice::GetTypeString(chromeos::AudioDeviceType type) {
switch (type) {
case chromeos::AUDIO_TYPE_HEADPHONE:
James Cook 2014/08/28 18:48:36 none of these need "chromeos::" anymore Also, you
Daniel Erat 2014/08/28 23:27:57 Done.
return "HEADPHONE";
Daniel Erat 2014/08/28 04:00:29 these strings seem like they should all be constan
jennyz 2014/08/28 17:42:49 Acknowledged.
@@ -59,7 +64,9 @@ std::string GetTypeString(chromeos::AudioDeviceType type) {
}
}
-chromeos::AudioDeviceType GetAudioType(const std::string& node_type) {
+// static
+chromeos::AudioDeviceType AudioDevice::GetAudioType(
+ const std::string& node_type) {
if (node_type.find("HEADPHONE") != std::string::npos)
return chromeos::AUDIO_TYPE_HEADPHONE;
else if (node_type.find("INTERNAL_MIC") != std::string::npos)
@@ -80,10 +87,6 @@ chromeos::AudioDeviceType GetAudioType(const std::string& node_type) {
return chromeos::AUDIO_TYPE_OTHER;
}
-} // namespace
-
-namespace chromeos {
-
AudioDevice::AudioDevice()
: is_input(false),
id(0),

Powered by Google App Engine
This is Rietveld 408576698