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

Unified Diff: ash/system/chromeos/tray_display.cc

Issue 1107383002: Merge Prevent DisplayPreferences from saving incorrect rotations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2357
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
« no previous file with comments | « ash/system/audio/tray_audio.cc ('k') | ash/system/overview/overview_button_tray_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/tray_display.cc
diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc
index 10f9ede1839ad6a1aef7153cb9a152114dee3e99..c964645800f32cbd5a0d1c721d4f7afc17f097b3 100644
--- a/ash/system/chromeos/tray_display.cc
+++ b/ash/system/chromeos/tray_display.cc
@@ -207,7 +207,7 @@ class DisplayView : public ActionableView {
base::string16 name = GetDisplayName(external_id);
const DisplayInfo& display_info =
display_manager->GetDisplayInfo(external_id);
- if (display_info.rotation() != gfx::Display::ROTATE_0 ||
+ if (display_info.GetActiveRotation() != gfx::Display::ROTATE_0 ||
display_info.configured_ui_scale() != 1.0f ||
!display_info.overscan_insets_in_dip().empty()) {
name = l10n_util::GetStringFUTF16(
@@ -263,10 +263,10 @@ class DisplayView : public ActionableView {
bool ShouldShowFirstDisplayInfo() const {
const DisplayInfo& display_info = GetDisplayManager()->GetDisplayInfo(
GetDisplayManager()->first_display_id());
- return display_info.rotation() != gfx::Display::ROTATE_0 ||
- display_info.configured_ui_scale() != 1.0f ||
- !display_info.overscan_insets_in_dip().empty() ||
- display_info.has_overscan();
+ return display_info.GetActiveRotation() != gfx::Display::ROTATE_0 ||
+ display_info.configured_ui_scale() != 1.0f ||
+ !display_info.overscan_insets_in_dip().empty() ||
+ display_info.has_overscan();
}
// Overridden from ActionableView.
@@ -340,9 +340,10 @@ bool TrayDisplay::GetDisplayMessageForNotification(
GetDisplaySize(iter->first));
return true;
}
- if (iter->second.rotation() != old_iter->second.rotation()) {
+ if (iter->second.GetActiveRotation() !=
+ old_iter->second.GetActiveRotation()) {
int rotation_text_id = 0;
- switch (iter->second.rotation()) {
+ switch (iter->second.GetActiveRotation()) {
case gfx::Display::ROTATE_0:
rotation_text_id = IDS_ASH_STATUS_TRAY_DISPLAY_STANDARD_ORIENTATION;
break;
« no previous file with comments | « ash/system/audio/tray_audio.cc ('k') | ash/system/overview/overview_button_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698