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 PrefServiceSimple; | 10 class PrefRegistrySimple; |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Display; | 13 class Display; |
14 class Insets; | 14 class Insets; |
15 } | 15 } |
16 | 16 |
17 namespace chromeos { | 17 namespace chromeos { |
18 | 18 |
19 // Registers the prefs associated with display settings and stored | 19 // Registers the prefs associated with display settings and stored |
20 // into Local State. | 20 // into Local State. |
21 void RegisterDisplayLocalStatePrefs(PrefServiceSimple* local_state); | 21 void RegisterDisplayLocalStatePrefs(PrefRegistrySimple* registry); |
22 | 22 |
23 // 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 |
24 // |pref_service|. | 24 // |pref_service|. |
25 void SetDisplayLayoutPref(const gfx::Display& display, | 25 void SetDisplayLayoutPref(const gfx::Display& display, |
26 int layout, | 26 int layout, |
27 int offset); | 27 int offset); |
28 | 28 |
29 // 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 |
30 // the data if the internal display's ID is specified. | 30 // the data if the internal display's ID is specified. |
31 void StorePrimaryDisplayIDPref(int64 display_id); | 31 void StorePrimaryDisplayIDPref(int64 display_id); |
32 | 32 |
33 // 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 |
34 // to the system. | 34 // to the system. |
35 void SetPrimaryDisplayIDPref(int64 display_id); | 35 void SetPrimaryDisplayIDPref(int64 display_id); |
36 | 36 |
37 // 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 |
38 // State. | 38 // State. |
39 void SetDisplayOverscan(const gfx::Display& display, const gfx::Insets& insets); | 39 void SetDisplayOverscan(const gfx::Display& display, const gfx::Insets& insets); |
40 | 40 |
41 // 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 |
42 // system. | 42 // system. |
43 void NotifyDisplayLocalStatePrefChanged(); | 43 void NotifyDisplayLocalStatePrefChanged(); |
44 | 44 |
45 } // namespace chromeos | 45 } // namespace chromeos |
46 | 46 |
47 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ | 47 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ |
OLD | NEW |