| 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 #ifndef CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "ash/display/display_layout.h" | |
| 11 #include "third_party/cros_system_api/dbus/service_constants.h" | 10 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 11 #include "ui/display/manager/display_layout.h" |
| 12 | 12 |
| 13 class PrefRegistrySimple; | 13 class PrefRegistrySimple; |
| 14 | 14 |
| 15 namespace ash { | |
| 16 class DisplayLayout; | |
| 17 } | |
| 18 | |
| 19 namespace gfx { | 15 namespace gfx { |
| 20 class Display; | 16 class Display; |
| 21 class Insets; | 17 class Insets; |
| 22 } | 18 } |
| 23 | 19 |
| 24 namespace chromeos { | 20 namespace chromeos { |
| 25 | 21 |
| 26 // Registers the prefs associated with display settings and stored | 22 // Registers the prefs associated with display settings and stored |
| 27 // into Local State. | 23 // into Local State. |
| 28 void RegisterDisplayLocalStatePrefs(PrefRegistrySimple* registry); | 24 void RegisterDisplayLocalStatePrefs(PrefRegistrySimple* registry); |
| 29 | 25 |
| 30 // Stores the current displays prefereces (both primary display id and | 26 // Stores the current displays prefereces (both primary display id and |
| 31 // dispay layout). | 27 // dispay layout). |
| 32 void StoreDisplayPrefs(); | 28 void StoreDisplayPrefs(); |
| 33 | 29 |
| 34 // If there is an internal display, stores |rotation_lock| along with the | 30 // If there is an internal display, stores |rotation_lock| along with the |
| 35 // current rotation of the internal display. Otherwise no data is stored. | 31 // current rotation of the internal display. Otherwise no data is stored. |
| 36 void StoreDisplayRotationPrefs(bool rotation_lock); | 32 void StoreDisplayRotationPrefs(bool rotation_lock); |
| 37 | 33 |
| 38 // Load display preferences from Local Store. |first_run_after_boot| is used | 34 // Load display preferences from Local Store. |first_run_after_boot| is used |
| 39 // determine if a certain preference should be applied at boot time or | 35 // determine if a certain preference should be applied at boot time or |
| 40 // restart. | 36 // restart. |
| 41 void LoadDisplayPreferences(bool first_run_after_boot); | 37 void LoadDisplayPreferences(bool first_run_after_boot); |
| 42 | 38 |
| 43 // Stores the display layout for given display pairs for tests. | 39 // Stores the display layout for given display pairs for tests. |
| 44 void StoreDisplayLayoutPrefForTest(const ash::DisplayIdList& list, | 40 void StoreDisplayLayoutPrefForTest(const display::DisplayIdList& list, |
| 45 const ash::DisplayLayout& layout); | 41 const display::DisplayLayout& layout); |
| 46 | 42 |
| 47 // Stores the given |power_state| for tests. | 43 // Stores the given |power_state| for tests. |
| 48 void StoreDisplayPowerStateForTest(DisplayPowerState power_state); | 44 void StoreDisplayPowerStateForTest(DisplayPowerState power_state); |
| 49 | 45 |
| 50 } // namespace chromeos | 46 } // namespace chromeos |
| 51 | 47 |
| 52 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ | 48 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ |
| OLD | NEW |