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

Unified Diff: ash/system/audio/tray_audio.cc

Issue 1071353003: Prevent DisplayPreferences from saving incorrect rotations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: ash/system/audio/tray_audio.cc
diff --git a/ash/system/audio/tray_audio.cc b/ash/system/audio/tray_audio.cc
index 21c2163c4d5606e2b2d098259490b23748710ede..aab719db2cbcd638d60bbc556f63d43b20a11c67 100644
--- a/ash/system/audio/tray_audio.cc
+++ b/ash/system/audio/tray_audio.cc
@@ -167,8 +167,10 @@ void TrayAudio::ChangeInternalSpeakerChannelMode() {
const DisplayInfo& display_info =
Shell::GetInstance()->display_manager()->GetDisplayInfo(
gfx::Display::InternalDisplayId());
- if (display_info.rotation() == gfx::Display::ROTATE_180)
+ if (display_info.Rotation(gfx::Display::ROTATION_SOURCE_ACTIVE) ==
+ gfx::Display::ROTATE_180) {
channel_mode = system::TrayAudioDelegate::LEFT_RIGHT_SWAPPED;
+ }
}
audio_delegate_->SetInternalSpeakerChannelMode(channel_mode);

Powered by Google App Engine
This is Rietveld 408576698