| 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 <memory> | 8 #include <memory> | 
| 9 #include <string> | 9 #include <string> | 
| 10 #include <vector> | 10 #include <vector> | 
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 89 | 89 | 
| 90   // Updates the controller associated with id (which should be a shortcut). | 90   // Updates the controller associated with id (which should be a shortcut). | 
| 91   // Takes ownership of |controller|. | 91   // Takes ownership of |controller|. | 
| 92   // TODO(skuhne): Pass in scoped_ptr to make ownership clear. | 92   // TODO(skuhne): Pass in scoped_ptr to make ownership clear. | 
| 93   virtual void SetItemController(ash::ShelfID id, | 93   virtual void SetItemController(ash::ShelfID id, | 
| 94                                  LauncherItemController* controller) = 0; | 94                                  LauncherItemController* controller) = 0; | 
| 95 | 95 | 
| 96   // Closes or unpins the shelf item. | 96   // Closes or unpins the shelf item. | 
| 97   virtual void CloseLauncherItem(ash::ShelfID id) = 0; | 97   virtual void CloseLauncherItem(ash::ShelfID id) = 0; | 
| 98 | 98 | 
| 99   // Pins the specified id. Currently only supports platform apps. |  | 
| 100   virtual void Pin(ash::ShelfID id) = 0; |  | 
| 101 |  | 
| 102   // Unpins the specified id, closing if not running. |  | 
| 103   virtual void Unpin(ash::ShelfID id) = 0; |  | 
| 104 |  | 
| 105   // Returns true if the item identified by |id| is pinned. | 99   // Returns true if the item identified by |id| is pinned. | 
| 106   virtual bool IsPinned(ash::ShelfID id) = 0; | 100   virtual bool IsPinned(ash::ShelfID id) = 0; | 
| 107 | 101 | 
| 108   // Pins/unpins the specified id. |  | 
| 109   virtual void TogglePinned(ash::ShelfID id) = 0; |  | 
| 110 |  | 
| 111   // If there is no item in the shelf for application |app_id|, one is created. | 102   // If there is no item in the shelf for application |app_id|, one is created. | 
| 112   // The (existing or created) shelf items get then locked against a user's | 103   // The (existing or created) shelf items get then locked against a user's | 
| 113   // un-pinning removal. Used for V1 apps opened as windows that aren't pinned. | 104   // un-pinning removal. Used for V1 apps opened as windows that aren't pinned. | 
| 114   virtual void LockV1AppWithID(const std::string& app_id) = 0; | 105   virtual void LockV1AppWithID(const std::string& app_id) = 0; | 
| 115 | 106 | 
| 116   // A previously locked shelf item of type |app_id| gets unlocked. If the | 107   // A previously locked shelf item of type |app_id| gets unlocked. If the | 
| 117   // lock count reaches 0 and the item is not pinned it will go away. | 108   // lock count reaches 0 and the item is not pinned it will go away. | 
| 118   virtual void UnlockV1AppWithID(const std::string& app_id) = 0; | 109   virtual void UnlockV1AppWithID(const std::string& app_id) = 0; | 
| 119 | 110 | 
| 120   // Requests that the shelf item controller specified by |id| open a new | 111   // Requests that the shelf item controller specified by |id| open a new | 
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 303   // An observer that manages the shelf title and icon for settings windows. | 294   // An observer that manages the shelf title and icon for settings windows. | 
| 304   SettingsWindowObserver settings_window_observer_; | 295   SettingsWindowObserver settings_window_observer_; | 
| 305 | 296 | 
| 306   // Used to load the images for app items. | 297   // Used to load the images for app items. | 
| 307   std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; | 298   std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; | 
| 308 | 299 | 
| 309   DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 300   DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 
| 310 }; | 301 }; | 
| 311 | 302 | 
| 312 #endif  // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 303 #endif  // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 
| OLD | NEW | 
|---|