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

Unified Diff: ash/display/display_manager.cc

Issue 1108343002: Revert of 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/display/display_manager.h ('k') | ash/display/root_window_transformers.cc » ('j') | no next file with comments »
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 e1b6551e8e958712f27f692a7c601c0105cd5bb7..b731ded75629bb985b260d201867de780c7edb0c 100644
--- a/ash/display/display_manager.cc
+++ b/ash/display/display_manager.cc
@@ -343,18 +343,15 @@
}
void DisplayManager::SetDisplayRotation(int64 display_id,
- gfx::Display::Rotation rotation,
- gfx::Display::RotationSource source) {
+ gfx::Display::Rotation rotation) {
DisplayInfoList display_info_list;
for (DisplayList::const_iterator iter = displays_.begin();
iter != displays_.end(); ++iter) {
DisplayInfo info = GetDisplayInfo(iter->id());
if (info.id() == display_id) {
- if (info.GetRotation(source) == rotation &&
- info.GetActiveRotation() == rotation) {
+ if (info.rotation() == rotation)
return;
- }
- info.SetRotation(rotation, source);
+ info.set_rotation(rotation);
}
display_info_list.push_back(info);
}
@@ -472,8 +469,7 @@
if (display_info_.find(display_id) == display_info_.end())
display_info_[display_id] = DisplayInfo(display_id, std::string(), false);
- display_info_[display_id].SetRotation(rotation,
- gfx::Display::ROTATION_SOURCE_ACTIVE);
+ display_info_[display_id].set_rotation(rotation);
display_info_[display_id].SetColorProfile(color_profile);
// Just in case the preference file was corrupted.
// TODO(mukai): register |display_modes_| here as well, so the lookup for the
@@ -1156,7 +1152,7 @@
// in |UpdateNonPrimaryDisplayBoundsForLayout| called in |UpdateDisplay|.
new_display.SetScaleAndBounds(
device_scale_factor, gfx::Rect(bounds_in_native.size()));
- new_display.set_rotation(display_info.GetActiveRotation());
+ new_display.set_rotation(display_info.rotation());
new_display.set_touch_support(display_info.touch_support());
return new_display;
}
« no previous file with comments | « ash/display/display_manager.h ('k') | ash/display/root_window_transformers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698