| 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 #include <vector> |
| 9 | 10 |
| 10 #include "ash/shelf/shelf_types.h" | 11 #include "ash/shelf/shelf_types.h" |
| 11 | 12 |
| 13 class AppTabHelper; |
| 12 class PrefService; | 14 class PrefService; |
| 13 | 15 |
| 14 namespace base { | 16 namespace base { |
| 15 class DictionaryValue; | 17 class DictionaryValue; |
| 16 } | 18 } |
| 17 | 19 |
| 18 namespace user_prefs { | 20 namespace user_prefs { |
| 19 class PrefRegistrySyncable; | 21 class PrefRegistrySyncable; |
| 20 } | 22 } |
| 21 | 23 |
| 22 namespace ash { | 24 namespace ash { |
| 23 | 25 |
| 24 // Path within the dictionary entries in the prefs::kPinnedLauncherApps list | 26 // Path within the dictionary entries in the prefs::kPinnedLauncherApps list |
| 25 // specifying the extension ID of the app to be pinned by that entry. | 27 // specifying the extension ID of the app to be pinned by that entry. |
| 26 extern const char kPinnedAppsPrefAppIDPath[]; | 28 extern const char kPinnedAppsPrefAppIDPath[]; |
| 27 | 29 |
| 28 extern const char kPinnedAppsPrefPinnedByPolicy[]; | 30 extern const char kPinnedAppsPrefPinnedByPolicy[]; |
| 29 | 31 |
| 32 // Value used as a placeholder in the list of pinned applications. |
| 33 // This is NOT a valid extension identifier so pre-M31 versions ignore it. |
| 34 extern const char kPinnedAppsPlaceholder[]; |
| 35 |
| 30 // Values used for prefs::kShelfAutoHideBehavior. | 36 // Values used for prefs::kShelfAutoHideBehavior. |
| 31 extern const char kShelfAutoHideBehaviorAlways[]; | 37 extern const char kShelfAutoHideBehaviorAlways[]; |
| 32 extern const char kShelfAutoHideBehaviorNever[]; | 38 extern const char kShelfAutoHideBehaviorNever[]; |
| 33 | 39 |
| 34 // Values used for prefs::kShelfAlignment. | 40 // Values used for prefs::kShelfAlignment. |
| 35 extern const char kShelfAlignmentBottom[]; | 41 extern const char kShelfAlignmentBottom[]; |
| 36 extern const char kShelfAlignmentLeft[]; | 42 extern const char kShelfAlignmentLeft[]; |
| 37 extern const char kShelfAlignmentRight[]; | 43 extern const char kShelfAlignmentRight[]; |
| 38 | 44 |
| 39 void RegisterChromeLauncherUserPrefs( | 45 void RegisterChromeLauncherUserPrefs( |
| 40 user_prefs::PrefRegistrySyncable* registry); | 46 user_prefs::PrefRegistrySyncable* registry); |
| 41 | 47 |
| 42 base::DictionaryValue* CreateAppDict(const std::string& app_id); | 48 base::DictionaryValue* CreateAppDict(const std::string& app_id); |
| 43 | 49 |
| 44 // Get or set the shelf auto hide behavior preference for a root window. | 50 // Get or set the shelf auto hide behavior preference for a particular display. |
| 45 ShelfAutoHideBehavior GetShelfAutoHideBehaviorPref(PrefService* prefs, | 51 ShelfAutoHideBehavior GetShelfAutoHideBehaviorPref(PrefService* prefs, |
| 46 int64_t display_id); | 52 int64_t display_id); |
| 47 void SetShelfAutoHideBehaviorPref(PrefService* prefs, | 53 void SetShelfAutoHideBehaviorPref(PrefService* prefs, |
| 48 int64_t display_id, | 54 int64_t display_id, |
| 49 ShelfAutoHideBehavior behavior); | 55 ShelfAutoHideBehavior behavior); |
| 50 | 56 |
| 51 // Get or set the shelf alignment preference for a root window. | 57 // Get or set the shelf alignment preference for a particular display. |
| 52 wm::ShelfAlignment GetShelfAlignmentPref(PrefService* prefs, | 58 wm::ShelfAlignment GetShelfAlignmentPref(PrefService* prefs, |
| 53 int64_t display_id); | 59 int64_t display_id); |
| 54 void SetShelfAlignmentPref(PrefService* prefs, | 60 void SetShelfAlignmentPref(PrefService* prefs, |
| 55 int64_t display_id, | 61 int64_t display_id, |
| 56 wm::ShelfAlignment alignment); | 62 wm::ShelfAlignment alignment); |
| 57 | 63 |
| 64 // Get the list of pinned apps from preferences. |
| 65 std::vector<std::string> GetPinnedAppsFromPrefs(PrefService* prefs, |
| 66 AppTabHelper* app_tab_helper); |
| 67 |
| 58 } // namespace ash | 68 } // namespace ash |
| 59 | 69 |
| 60 #endif // CHROME_BROWSER_UI_ASH_CHROME_LAUNCHER_PREFS_H_ | 70 #endif // CHROME_BROWSER_UI_ASH_CHROME_LAUNCHER_PREFS_H_ |
| OLD | NEW |