OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 virtual bool IsLoggedInAsGuest(); | 215 virtual bool IsLoggedInAsGuest(); |
216 | 216 |
217 // Invoked when user clicks on button in the launcher and there is no last | 217 // Invoked when user clicks on button in the launcher and there is no last |
218 // used window (or CTRL is held with the click). | 218 // used window (or CTRL is held with the click). |
219 void CreateNewWindow(); | 219 void CreateNewWindow(); |
220 | 220 |
221 // Invoked when the user clicks on button in the launcher to create a new | 221 // Invoked when the user clicks on button in the launcher to create a new |
222 // incognito window. | 222 // incognito window. |
223 void CreateNewIncognitoWindow(); | 223 void CreateNewIncognitoWindow(); |
224 | 224 |
225 // Checks whether the user is allowed to pin apps. Pinning may be disallowed | |
226 // by policy in case there is a pre-defined set of pinned apps. | |
227 bool CanPin() const; | |
228 | |
229 // Updates the pinned pref state. The pinned state consists of a list pref. | 225 // Updates the pinned pref state. The pinned state consists of a list pref. |
230 // Each item of the list is a dictionary. The key |kAppIDPath| gives the | 226 // Each item of the list is a dictionary. The key |kAppIDPath| gives the |
231 // id of the app. | 227 // id of the app. |
232 void PersistPinnedState(); | 228 void PersistPinnedState(); |
233 | 229 |
234 ash::LauncherModel* model(); | 230 ash::LauncherModel* model(); |
235 | 231 |
236 Profile* profile(); | 232 Profile* profile(); |
237 | 233 |
238 // Gets the shelf auto-hide behavior on |root_window|. | 234 // Gets the shelf auto-hide behavior on |root_window|. |
(...skipping 30 matching lines...) Expand all Loading... |
269 | 265 |
270 // ash::LauncherDelegate overrides: | 266 // ash::LauncherDelegate overrides: |
271 virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE; | 267 virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE; |
272 virtual void OnLauncherCreated(ash::Launcher* launcher) OVERRIDE; | 268 virtual void OnLauncherCreated(ash::Launcher* launcher) OVERRIDE; |
273 virtual void OnLauncherDestroyed(ash::Launcher* launcher) OVERRIDE; | 269 virtual void OnLauncherDestroyed(ash::Launcher* launcher) OVERRIDE; |
274 virtual ash::LauncherID GetLauncherIDForAppID( | 270 virtual ash::LauncherID GetLauncherIDForAppID( |
275 const std::string& app_id) OVERRIDE; | 271 const std::string& app_id) OVERRIDE; |
276 virtual const std::string& GetAppIDForLauncherID(ash::LauncherID id) OVERRIDE; | 272 virtual const std::string& GetAppIDForLauncherID(ash::LauncherID id) OVERRIDE; |
277 virtual void PinAppWithID(const std::string& app_id) OVERRIDE; | 273 virtual void PinAppWithID(const std::string& app_id) OVERRIDE; |
278 virtual bool IsAppPinned(const std::string& app_id) OVERRIDE; | 274 virtual bool IsAppPinned(const std::string& app_id) OVERRIDE; |
| 275 virtual bool CanPin() const OVERRIDE; |
279 virtual void UnpinAppWithID(const std::string& app_id) OVERRIDE; | 276 virtual void UnpinAppWithID(const std::string& app_id) OVERRIDE; |
280 | 277 |
281 // ash::LauncherItemDelegate overrides: | 278 // ash::LauncherItemDelegate overrides: |
282 virtual void ItemSelected(const ash::LauncherItem& item, | 279 virtual void ItemSelected(const ash::LauncherItem& item, |
283 const ui::Event& event) OVERRIDE; | 280 const ui::Event& event) OVERRIDE; |
284 virtual string16 GetTitle(const ash::LauncherItem& item) OVERRIDE; | 281 virtual string16 GetTitle(const ash::LauncherItem& item) OVERRIDE; |
285 virtual ui::MenuModel* CreateContextMenu( | 282 virtual ui::MenuModel* CreateContextMenu( |
286 const ash::LauncherItem& item, aura::RootWindow* root) OVERRIDE; | 283 const ash::LauncherItem& item, aura::RootWindow* root) OVERRIDE; |
287 virtual ash::LauncherMenuModel* CreateApplicationMenu( | 284 virtual ash::LauncherMenuModel* CreateApplicationMenu( |
288 const ash::LauncherItem& item, | 285 const ash::LauncherItem& item, |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 // The owned browser status monitor. | 503 // The owned browser status monitor. |
507 scoped_ptr<BrowserStatusMonitor> browser_status_monitor_; | 504 scoped_ptr<BrowserStatusMonitor> browser_status_monitor_; |
508 | 505 |
509 // If true, incoming pinned state changes should be ignored. | 506 // If true, incoming pinned state changes should be ignored. |
510 bool ignore_persist_pinned_state_change_; | 507 bool ignore_persist_pinned_state_change_; |
511 | 508 |
512 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 509 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
513 }; | 510 }; |
514 | 511 |
515 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 512 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
OLD | NEW |