| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/display/display_preferences.h" | 5 #include "chrome/browser/chromeos/display/display_preferences.h" |
| 6 | 6 |
| 7 #include "ash/display/display_layout_store.h" | 7 #include "ash/display/display_layout_store.h" |
| 8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
| 9 #include "ash/display/display_pref_util.h" | 9 #include "ash/display/display_pref_util.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 const DisplayPowerStateToStringMap* map = GetDisplayPowerStateToStringMap(); | 301 const DisplayPowerStateToStringMap* map = GetDisplayPowerStateToStringMap(); |
| 302 DisplayPowerStateToStringMap::const_iterator iter = map->find(power_state); | 302 DisplayPowerStateToStringMap::const_iterator iter = map->find(power_state); |
| 303 if (iter != map->end()) { | 303 if (iter != map->end()) { |
| 304 PrefService* local_state = g_browser_process->local_state(); | 304 PrefService* local_state = g_browser_process->local_state(); |
| 305 local_state->SetString(prefs::kDisplayPowerState, iter->second); | 305 local_state->SetString(prefs::kDisplayPowerState, iter->second); |
| 306 } | 306 } |
| 307 } | 307 } |
| 308 | 308 |
| 309 void StoreCurrentDisplayPowerState() { | 309 void StoreCurrentDisplayPowerState() { |
| 310 StoreDisplayPowerState( | 310 StoreDisplayPowerState( |
| 311 ash::Shell::GetInstance()->display_configurator()->power_state()); | 311 ash::Shell::GetInstance()->display_configurator()-> |
| 312 requested_power_state()); |
| 312 } | 313 } |
| 313 | 314 |
| 314 void StoreCurrentDisplayRotationLockPrefs() { | 315 void StoreCurrentDisplayRotationLockPrefs() { |
| 315 bool rotation_lock = ash::Shell::GetInstance()->display_manager()-> | 316 bool rotation_lock = ash::Shell::GetInstance()->display_manager()-> |
| 316 registered_internal_display_rotation_lock(); | 317 registered_internal_display_rotation_lock(); |
| 317 StoreDisplayRotationPrefs(rotation_lock); | 318 StoreDisplayRotationPrefs(rotation_lock); |
| 318 } | 319 } |
| 319 | 320 |
| 320 } // namespace | 321 } // namespace |
| 321 | 322 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 const ash::DisplayLayout& layout) { | 387 const ash::DisplayLayout& layout) { |
| 387 StoreDisplayLayoutPref(std::make_pair(id1, id2), layout); | 388 StoreDisplayLayoutPref(std::make_pair(id1, id2), layout); |
| 388 } | 389 } |
| 389 | 390 |
| 390 // Stores the given |power_state|. | 391 // Stores the given |power_state|. |
| 391 void StoreDisplayPowerStateForTest(DisplayPowerState power_state) { | 392 void StoreDisplayPowerStateForTest(DisplayPowerState power_state) { |
| 392 StoreDisplayPowerState(power_state); | 393 StoreDisplayPowerState(power_state); |
| 393 } | 394 } |
| 394 | 395 |
| 395 } // namespace chromeos | 396 } // namespace chromeos |
| OLD | NEW |