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_UI_ASH_CHROME_LAUNCHER_PREFS_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_CHROME_LAUNCHER_PREFS_H_ |
6 #define CHROME_BROWSER_UI_ASH_CHROME_LAUNCHER_PREFS_H_ | 6 #define CHROME_BROWSER_UI_ASH_CHROME_LAUNCHER_PREFS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/shelf/shelf_types.h" | 10 #include "ash/shelf/shelf_types.h" |
11 | 11 |
12 class Profile; | |
oshima
2016/04/14 19:26:17
can we instead use PrefSerivce?
msw
2016/04/14 20:39:26
Done.
| |
13 | |
12 namespace base { | 14 namespace base { |
13 class DictionaryValue; | 15 class DictionaryValue; |
14 } | 16 } |
15 | 17 |
16 namespace user_prefs { | 18 namespace user_prefs { |
17 class PrefRegistrySyncable; | 19 class PrefRegistrySyncable; |
18 } | 20 } |
19 | 21 |
20 namespace ash { | 22 namespace ash { |
21 | 23 |
(...skipping 10 matching lines...) Expand all Loading... | |
32 // Values used for prefs::kShelfAlignment. | 34 // Values used for prefs::kShelfAlignment. |
33 extern const char kShelfAlignmentBottom[]; | 35 extern const char kShelfAlignmentBottom[]; |
34 extern const char kShelfAlignmentLeft[]; | 36 extern const char kShelfAlignmentLeft[]; |
35 extern const char kShelfAlignmentRight[]; | 37 extern const char kShelfAlignmentRight[]; |
36 | 38 |
37 void RegisterChromeLauncherUserPrefs( | 39 void RegisterChromeLauncherUserPrefs( |
38 user_prefs::PrefRegistrySyncable* registry); | 40 user_prefs::PrefRegistrySyncable* registry); |
39 | 41 |
40 base::DictionaryValue* CreateAppDict(const std::string& app_id); | 42 base::DictionaryValue* CreateAppDict(const std::string& app_id); |
41 | 43 |
42 ash::ShelfAlignment AlignmentFromPref(const std::string& value); | 44 // Get or set the shelf auto hide behavior preference for a root window. |
43 const char* AlignmentToPref(ash::ShelfAlignment alignment); | 45 ShelfAutoHideBehavior GetShelfAutoHideBehaviorPref(Profile* profile, |
46 int64_t display_id); | |
47 void SetShelfAutoHideBehaviorPref(Profile* profile, | |
48 int64_t display_id, | |
49 ShelfAutoHideBehavior behavior); | |
44 | 50 |
45 ash::ShelfAutoHideBehavior AutoHideBehaviorFromPref(const std::string& value); | 51 // Get or set the shelf alignment preference for a root window. |
46 const char* AutoHideBehaviorToPref(ash::ShelfAutoHideBehavior behavior); | 52 ShelfAlignment GetShelfAlignmentPref(Profile* profile, int64_t display_id); |
53 void SetShelfAlignmentPref(Profile* profile, | |
54 int64_t display_id, | |
55 ShelfAlignment alignment); | |
47 | 56 |
48 } // namespace ash | 57 } // namespace ash |
49 | 58 |
50 #endif // CHROME_BROWSER_UI_ASH_CHROME_LAUNCHER_PREFS_H_ | 59 #endif // CHROME_BROWSER_UI_ASH_CHROME_LAUNCHER_PREFS_H_ |
OLD | NEW |