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

Unified Diff: ash/display/display_manager.cc

Issue 620673002: Flip the left/right speaker when the device is in yoga mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | ash/system/audio/tray_audio.cc » ('j') | ash/system/audio/tray_audio_delegate.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_manager.cc
diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc
index 4cec2ea81d73a1332c309e16efe78eb081f4ce7c..016feda0c1d4c791c8432c68c4032d206478ea1b 100644
--- a/ash/display/display_manager.cc
+++ b/ash/display/display_manager.cc
@@ -39,6 +39,7 @@
#if defined(OS_CHROMEOS)
#include "ash/display/display_configurator_animation.h"
#include "base/sys_info.h"
+#include "chromeos/audio/cras_audio_handler.h"
#endif
#if defined(OS_WIN)
@@ -437,6 +438,12 @@ void DisplayManager::SetDisplayRotation(int64 display_id,
}
AddMirrorDisplayInfoIfAny(&display_info_list);
UpdateDisplays(display_info_list);
+
+#if defined(OS_CHROMEOS)
+ // Swap the left/right channel of the speaker only if it is yoga mode.
oshima 2014/09/30 22:29:53 1) Can you use gfx::DisplayObserver::OnDisplayMetr
jennyz 2014/10/01 00:22:59 Thanks for pointing me to gfx::DisplayObserver::On
+ chromeos::CrasAudioHandler::Get()->SwapLeftRight(rotation ==
+ gfx::Display::ROTATE_180);
+#endif
}
void DisplayManager::SetDisplayUIScale(int64 display_id,
« no previous file with comments | « no previous file | ash/system/audio/tray_audio.cc » ('j') | ash/system/audio/tray_audio_delegate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698