| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "ash/display/display_controller.h" | 14 #include "ash/display/display_controller.h" |
| 15 #include "ash/launcher/launcher_delegate.h" | 15 #include "ash/launcher/launcher_delegate.h" |
| 16 #include "ash/launcher/launcher_item_delegate.h" | 16 #include "ash/launcher/launcher_item_delegate.h" |
| 17 #include "ash/launcher/launcher_model_observer.h" | |
| 18 #include "ash/launcher/launcher_types.h" | 17 #include "ash/launcher/launcher_types.h" |
| 19 #include "ash/shelf/shelf_layout_manager_observer.h" | 18 #include "ash/shelf/shelf_layout_manager_observer.h" |
| 19 #include "ash/shelf/shelf_model_observer.h" |
| 20 #include "ash/shelf/shelf_types.h" | 20 #include "ash/shelf/shelf_types.h" |
| 21 #include "ash/shell_observer.h" | 21 #include "ash/shell_observer.h" |
| 22 #include "base/basictypes.h" | 22 #include "base/basictypes.h" |
| 23 #include "base/compiler_specific.h" | 23 #include "base/compiler_specific.h" |
| 24 #include "base/memory/scoped_ptr.h" | 24 #include "base/memory/scoped_ptr.h" |
| 25 #include "base/memory/scoped_vector.h" | 25 #include "base/memory/scoped_vector.h" |
| 26 #include "base/prefs/pref_change_registrar.h" | 26 #include "base/prefs/pref_change_registrar.h" |
| 27 #include "chrome/browser/extensions/app_icon_loader.h" | 27 #include "chrome/browser/extensions/app_icon_loader.h" |
| 28 #include "chrome/browser/extensions/extension_prefs.h" | 28 #include "chrome/browser/extensions/extension_prefs.h" |
| 29 #include "chrome/browser/prefs/pref_service_syncable_observer.h" | 29 #include "chrome/browser/prefs/pref_service_syncable_observer.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 // ChromeLauncherController manages the launcher items needed for content | 81 // ChromeLauncherController manages the launcher items needed for content |
| 82 // windows. Launcher items have a type, an optional app id, and a controller. | 82 // windows. Launcher items have a type, an optional app id, and a controller. |
| 83 // This incarnation groups running tabs/windows in application specific lists. | 83 // This incarnation groups running tabs/windows in application specific lists. |
| 84 // * Browser app windows have BrowserLauncherItemController, owned by the | 84 // * Browser app windows have BrowserLauncherItemController, owned by the |
| 85 // BrowserView instance. | 85 // BrowserView instance. |
| 86 // * App shell windows have ShellWindowLauncherItemController, owned by | 86 // * App shell windows have ShellWindowLauncherItemController, owned by |
| 87 // ShellWindowLauncherController. | 87 // ShellWindowLauncherController. |
| 88 // * Shortcuts have no LauncherItemController. | 88 // * Shortcuts have no LauncherItemController. |
| 89 class ChromeLauncherController : public ash::LauncherDelegate, | 89 class ChromeLauncherController : public ash::LauncherDelegate, |
| 90 public ash::LauncherModelObserver, | 90 public ash::ShelfModelObserver, |
| 91 public ash::ShellObserver, | 91 public ash::ShellObserver, |
| 92 public ash::DisplayController::Observer, | 92 public ash::DisplayController::Observer, |
| 93 public content::NotificationObserver, | 93 public content::NotificationObserver, |
| 94 public extensions::AppIconLoader::Delegate, | 94 public extensions::AppIconLoader::Delegate, |
| 95 public PrefServiceSyncableObserver, | 95 public PrefServiceSyncableObserver, |
| 96 public AppSyncUIStateObserver, | 96 public AppSyncUIStateObserver, |
| 97 public ExtensionEnableFlowDelegate, | 97 public ExtensionEnableFlowDelegate, |
| 98 public ash::ShelfLayoutManagerObserver { | 98 public ash::ShelfLayoutManagerObserver { |
| 99 public: | 99 public: |
| 100 // Indicates if a launcher item is incognito or not. | 100 // Indicates if a launcher item is incognito or not. |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 virtual void OnLauncherCreated(ash::Launcher* launcher) OVERRIDE; | 287 virtual void OnLauncherCreated(ash::Launcher* launcher) OVERRIDE; |
| 288 virtual void OnLauncherDestroyed(ash::Launcher* launcher) OVERRIDE; | 288 virtual void OnLauncherDestroyed(ash::Launcher* launcher) OVERRIDE; |
| 289 virtual ash::LauncherID GetLauncherIDForAppID( | 289 virtual ash::LauncherID GetLauncherIDForAppID( |
| 290 const std::string& app_id) OVERRIDE; | 290 const std::string& app_id) OVERRIDE; |
| 291 virtual const std::string& GetAppIDForLauncherID(ash::LauncherID id) OVERRIDE; | 291 virtual const std::string& GetAppIDForLauncherID(ash::LauncherID id) OVERRIDE; |
| 292 virtual void PinAppWithID(const std::string& app_id) OVERRIDE; | 292 virtual void PinAppWithID(const std::string& app_id) OVERRIDE; |
| 293 virtual bool IsAppPinned(const std::string& app_id) OVERRIDE; | 293 virtual bool IsAppPinned(const std::string& app_id) OVERRIDE; |
| 294 virtual bool CanPin() const OVERRIDE; | 294 virtual bool CanPin() const OVERRIDE; |
| 295 virtual void UnpinAppWithID(const std::string& app_id) OVERRIDE; | 295 virtual void UnpinAppWithID(const std::string& app_id) OVERRIDE; |
| 296 | 296 |
| 297 // ash::LauncherModelObserver overrides: | 297 // ash::ShelfModelObserver overrides: |
| 298 virtual void LauncherItemAdded(int index) OVERRIDE; | 298 virtual void ShelfItemAdded(int index) OVERRIDE; |
| 299 virtual void LauncherItemRemoved(int index, ash::LauncherID id) OVERRIDE; | 299 virtual void ShelfItemRemoved(int index, ash::LauncherID id) OVERRIDE; |
| 300 virtual void LauncherItemMoved(int start_index, int target_index) OVERRIDE; | 300 virtual void ShelfItemMoved(int start_index, int target_index) OVERRIDE; |
| 301 virtual void LauncherItemChanged(int index, | 301 virtual void ShelfItemChanged(int index, |
| 302 const ash::LauncherItem& old_item) OVERRIDE; | 302 const ash::LauncherItem& old_item) OVERRIDE; |
| 303 virtual void LauncherStatusChanged() OVERRIDE; | 303 virtual void ShelfStatusChanged() OVERRIDE; |
| 304 | 304 |
| 305 // content::NotificationObserver overrides: | 305 // content::NotificationObserver overrides: |
| 306 virtual void Observe(int type, | 306 virtual void Observe(int type, |
| 307 const content::NotificationSource& source, | 307 const content::NotificationSource& source, |
| 308 const content::NotificationDetails& details) OVERRIDE; | 308 const content::NotificationDetails& details) OVERRIDE; |
| 309 | 309 |
| 310 // ash::ShellObserver overrides: | 310 // ash::ShellObserver overrides: |
| 311 virtual void OnShelfAlignmentChanged(aura::Window* root_window) OVERRIDE; | 311 virtual void OnShelfAlignmentChanged(aura::Window* root_window) OVERRIDE; |
| 312 | 312 |
| 313 // ash::DisplayController::Observer overrides: | 313 // ash::DisplayController::Observer overrides: |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 // If true, incoming pinned state changes should be ignored. | 578 // If true, incoming pinned state changes should be ignored. |
| 579 bool ignore_persist_pinned_state_change_; | 579 bool ignore_persist_pinned_state_change_; |
| 580 | 580 |
| 581 // True if each user has an own desktop. | 581 // True if each user has an own desktop. |
| 582 bool multi_profile_desktop_separation_; | 582 bool multi_profile_desktop_separation_; |
| 583 | 583 |
| 584 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); | 584 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); |
| 585 }; | 585 }; |
| 586 | 586 |
| 587 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 587 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| OLD | NEW |