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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // Used during restore to ignore no longer valid extensions. | 127 // Used during restore to ignore no longer valid extensions. |
128 // Note that already running applications are ignored by the restore | 128 // Note that already running applications are ignored by the restore |
129 // process. | 129 // process. |
130 virtual bool IsValidIDForCurrentUser(const std::string& id) = 0; | 130 virtual bool IsValidIDForCurrentUser(const std::string& id) = 0; |
131 | 131 |
132 // Sets the currently active profile for the usage of |GetAppID|. | 132 // Sets the currently active profile for the usage of |GetAppID|. |
133 virtual void SetCurrentUser(Profile* profile) = 0; | 133 virtual void SetCurrentUser(Profile* profile) = 0; |
134 }; | 134 }; |
135 | 135 |
136 ChromeLauncherController(Profile* profile, ash::ShelfModel* model); | 136 ChromeLauncherController(Profile* profile, ash::ShelfModel* model); |
137 virtual ~ChromeLauncherController(); | 137 ~ChromeLauncherController() override; |
138 | 138 |
139 // Initializes this ChromeLauncherController. | 139 // Initializes this ChromeLauncherController. |
140 void Init(); | 140 void Init(); |
141 | 141 |
142 // Creates an instance. | 142 // Creates an instance. |
143 static ChromeLauncherController* CreateInstance(Profile* profile, | 143 static ChromeLauncherController* CreateInstance(Profile* profile, |
144 ash::ShelfModel* model); | 144 ash::ShelfModel* model); |
145 | 145 |
146 // Returns the single ChromeLauncherController instance. | 146 // Returns the single ChromeLauncherController instance. |
147 static ChromeLauncherController* instance() { return instance_; } | 147 static ChromeLauncherController* instance() { return instance_; } |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 // Returns the extension identified by |app_id|. | 284 // Returns the extension identified by |app_id|. |
285 const extensions::Extension* GetExtensionForAppID( | 285 const extensions::Extension* GetExtensionForAppID( |
286 const std::string& app_id) const; | 286 const std::string& app_id) const; |
287 | 287 |
288 // Activates a |window|. If |allow_minimize| is true and the system allows | 288 // Activates a |window|. If |allow_minimize| is true and the system allows |
289 // it, the the window will get minimized instead. | 289 // it, the the window will get minimized instead. |
290 void ActivateWindowOrMinimizeIfActive(ui::BaseWindow* window, | 290 void ActivateWindowOrMinimizeIfActive(ui::BaseWindow* window, |
291 bool allow_minimize); | 291 bool allow_minimize); |
292 | 292 |
293 // ash::ShelfDelegate overrides: | 293 // ash::ShelfDelegate overrides: |
294 virtual void OnShelfCreated(ash::Shelf* shelf) override; | 294 void OnShelfCreated(ash::Shelf* shelf) override; |
295 virtual void OnShelfDestroyed(ash::Shelf* shelf) override; | 295 void OnShelfDestroyed(ash::Shelf* shelf) override; |
296 virtual ash::ShelfID GetShelfIDForAppID(const std::string& app_id) override; | 296 ash::ShelfID GetShelfIDForAppID(const std::string& app_id) override; |
297 virtual const std::string& GetAppIDForShelfID(ash::ShelfID id) override; | 297 const std::string& GetAppIDForShelfID(ash::ShelfID id) override; |
298 virtual void PinAppWithID(const std::string& app_id) override; | 298 void PinAppWithID(const std::string& app_id) override; |
299 virtual bool IsAppPinned(const std::string& app_id) override; | 299 bool IsAppPinned(const std::string& app_id) override; |
300 virtual bool CanPin() const override; | 300 bool CanPin() const override; |
301 virtual void UnpinAppWithID(const std::string& app_id) override; | 301 void UnpinAppWithID(const std::string& app_id) override; |
302 | 302 |
303 // ash::ShelfModelObserver overrides: | 303 // ash::ShelfModelObserver overrides: |
304 virtual void ShelfItemAdded(int index) override; | 304 void ShelfItemAdded(int index) override; |
305 virtual void ShelfItemRemoved(int index, ash::ShelfID id) override; | 305 void ShelfItemRemoved(int index, ash::ShelfID id) override; |
306 virtual void ShelfItemMoved(int start_index, int target_index) override; | 306 void ShelfItemMoved(int start_index, int target_index) override; |
307 virtual void ShelfItemChanged(int index, | 307 void ShelfItemChanged(int index, const ash::ShelfItem& old_item) override; |
308 const ash::ShelfItem& old_item) override; | 308 void ShelfStatusChanged() override; |
309 virtual void ShelfStatusChanged() override; | |
310 | 309 |
311 // ash::ShellObserver overrides: | 310 // ash::ShellObserver overrides: |
312 virtual void OnShelfAlignmentChanged(aura::Window* root_window) override; | 311 void OnShelfAlignmentChanged(aura::Window* root_window) override; |
313 | 312 |
314 // ash::DisplayController::Observer overrides: | 313 // ash::DisplayController::Observer overrides: |
315 virtual void OnDisplayConfigurationChanged() override; | 314 void OnDisplayConfigurationChanged() override; |
316 | 315 |
317 // ExtensionRegistryObserver overrides: | 316 // ExtensionRegistryObserver overrides: |
318 virtual void OnExtensionLoaded( | 317 void OnExtensionLoaded(content::BrowserContext* browser_context, |
319 content::BrowserContext* browser_context, | 318 const extensions::Extension* extension) override; |
320 const extensions::Extension* extension) override; | 319 void OnExtensionUnloaded( |
321 virtual void OnExtensionUnloaded( | |
322 content::BrowserContext* browser_context, | 320 content::BrowserContext* browser_context, |
323 const extensions::Extension* extension, | 321 const extensions::Extension* extension, |
324 extensions::UnloadedExtensionInfo::Reason reason) override; | 322 extensions::UnloadedExtensionInfo::Reason reason) override; |
325 | 323 |
326 // PrefServiceSyncableObserver overrides: | 324 // PrefServiceSyncableObserver overrides: |
327 virtual void OnIsSyncingChanged() override; | 325 void OnIsSyncingChanged() override; |
328 | 326 |
329 // AppSyncUIStateObserver overrides: | 327 // AppSyncUIStateObserver overrides: |
330 virtual void OnAppSyncUIStatusChanged() override; | 328 void OnAppSyncUIStatusChanged() override; |
331 | 329 |
332 // ExtensionEnableFlowDelegate overrides: | 330 // ExtensionEnableFlowDelegate overrides: |
333 virtual void ExtensionEnableFlowFinished() override; | 331 void ExtensionEnableFlowFinished() override; |
334 virtual void ExtensionEnableFlowAborted(bool user_initiated) override; | 332 void ExtensionEnableFlowAborted(bool user_initiated) override; |
335 | 333 |
336 // extensions::AppIconLoader overrides: | 334 // extensions::AppIconLoader overrides: |
337 virtual void SetAppImage(const std::string& app_id, | 335 void SetAppImage(const std::string& app_id, |
338 const gfx::ImageSkia& image) override; | 336 const gfx::ImageSkia& image) override; |
339 | 337 |
340 // ash::ShelfLayoutManagerObserver overrides: | 338 // ash::ShelfLayoutManagerObserver overrides: |
341 virtual void OnAutoHideBehaviorChanged( | 339 void OnAutoHideBehaviorChanged( |
342 aura::Window* root_window, | 340 aura::Window* root_window, |
343 ash::ShelfAutoHideBehavior new_behavior) override; | 341 ash::ShelfAutoHideBehavior new_behavior) override; |
344 | 342 |
345 // Called when the active user has changed. | 343 // Called when the active user has changed. |
346 void ActiveUserChanged(const std::string& user_email); | 344 void ActiveUserChanged(const std::string& user_email); |
347 | 345 |
348 // Called when a user got added to the session. | 346 // Called when a user got added to the session. |
349 void AdditionalUserAddedToSession(Profile* profile); | 347 void AdditionalUserAddedToSession(Profile* profile); |
350 | 348 |
351 // Get the list of all running incarnations of this item. | 349 // Get the list of all running incarnations of this item. |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 // The list of running & un-pinned applications for different users on hidden | 602 // The list of running & un-pinned applications for different users on hidden |
605 // desktops. | 603 // desktops. |
606 typedef std::vector<std::string> RunningAppListIds; | 604 typedef std::vector<std::string> RunningAppListIds; |
607 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; | 605 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; |
608 RunningAppListIdMap last_used_running_application_order_; | 606 RunningAppListIdMap last_used_running_application_order_; |
609 | 607 |
610 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 608 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
611 }; | 609 }; |
612 | 610 |
613 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 611 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
OLD | NEW |