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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 class PrefService; | 10 class PrefServiceSimple; |
| 11 |
11 namespace gfx { | 12 namespace gfx { |
12 class Display; | 13 class Display; |
13 class Insets; | 14 class Insets; |
14 } | 15 } |
15 | 16 |
16 namespace chromeos { | 17 namespace chromeos { |
17 | 18 |
18 // Registers the prefs associated with display settings and stored | 19 // Registers the prefs associated with display settings and stored |
19 // into Local State. | 20 // into Local State. |
20 void RegisterDisplayLocalStatePrefs(PrefService* local_state); | 21 void RegisterDisplayLocalStatePrefs(PrefServiceSimple* local_state); |
21 | 22 |
22 // Sets or updates the display layout data to the specified |display| and | 23 // Sets or updates the display layout data to the specified |display| and |
23 // |pref_service|. | 24 // |pref_service|. |
24 void SetDisplayLayoutPref(const gfx::Display& display, | 25 void SetDisplayLayoutPref(const gfx::Display& display, |
25 int layout, | 26 int layout, |
26 int offset); | 27 int offset); |
27 | 28 |
28 // Stores the specified ID as the primary display ID to Local State. Clears | 29 // Stores the specified ID as the primary display ID to Local State. Clears |
29 // the data if the internal display's ID is specified. | 30 // the data if the internal display's ID is specified. |
30 void StorePrimaryDisplayIDPref(int64 display_id); | 31 void StorePrimaryDisplayIDPref(int64 display_id); |
31 | 32 |
32 // Sets or updates the primary display device by its ID, and notifies the update | 33 // Sets or updates the primary display device by its ID, and notifies the update |
33 // to the system. | 34 // to the system. |
34 void SetPrimaryDisplayIDPref(int64 display_id); | 35 void SetPrimaryDisplayIDPref(int64 display_id); |
35 | 36 |
36 // Sets or updates the overscan preference for the specified |display| to Local | 37 // Sets or updates the overscan preference for the specified |display| to Local |
37 // State. | 38 // State. |
38 void SetDisplayOverscan(const gfx::Display& display, const gfx::Insets& insets); | 39 void SetDisplayOverscan(const gfx::Display& display, const gfx::Insets& insets); |
39 | 40 |
40 // Checks the current display settings in Local State and notifies them to the | 41 // Checks the current display settings in Local State and notifies them to the |
41 // system. | 42 // system. |
42 void NotifyDisplayLocalStatePrefChanged(); | 43 void NotifyDisplayLocalStatePrefChanged(); |
43 | 44 |
44 } // namespace chromeos | 45 } // namespace chromeos |
45 | 46 |
46 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ | 47 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ |
OLD | NEW |