Chromium Code Reviews| Index: chrome/browser/chromeos/display/display_preferences.cc |
| diff --git a/chrome/browser/chromeos/display/display_preferences.cc b/chrome/browser/chromeos/display/display_preferences.cc |
| index a71342ddcd4b3305d1f33b94209a9f041ba8d527..e5c6bfeb9860de58d6157c54ab826def5590cb4a 100644 |
| --- a/chrome/browser/chromeos/display/display_preferences.cc |
| +++ b/chrome/browser/chromeos/display/display_preferences.cc |
| @@ -251,7 +251,9 @@ void StoreCurrentDisplayProperties() { |
| scoped_ptr<base::DictionaryValue> property_value( |
| new base::DictionaryValue()); |
| - property_value->SetInteger("rotation", static_cast<int>(info.rotation())); |
| + property_value->SetInteger( |
| + "rotation", |
| + static_cast<int>(info.Rotation(gfx::Display::ROTATION_SOURCE_USER))); |
|
jonross
2015/04/10 17:54:43
This is not just a refactor, but addresses the bug
tdanderson
2015/04/13 22:44:46
nit: Consider changing your CL title to mention th
jonross
2015/04/15 17:43:12
Done.
|
| property_value->SetInteger( |
| "ui-scale", |
| static_cast<int>(info.configured_ui_scale() * 1000)); |
| @@ -356,8 +358,9 @@ void StoreDisplayRotationPrefs(bool rotation_lock) { |
| DictionaryPrefUpdate update(local_state, prefs::kDisplayRotationLock); |
| base::DictionaryValue* pref_data = update.Get(); |
| pref_data->SetBoolean("lock", rotation_lock); |
| - gfx::Display::Rotation rotation = display_manager-> |
| - GetDisplayInfo(gfx::Display::InternalDisplayId()).rotation(); |
| + gfx::Display::Rotation rotation = |
| + display_manager->GetDisplayInfo(gfx::Display::InternalDisplayId()) |
| + .Rotation(gfx::Display::ROTATION_SOURCE_ACCELEROMETER); |
| pref_data->SetInteger("orientation", static_cast<int>(rotation)); |
| } |