| 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_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "ash/common/shelf/shelf_delegate.h" | 11 #include "ash/common/shelf/shelf_delegate.h" |
| 12 #include "ash/common/shelf/shelf_model_observer.h" | 12 #include "ash/common/shelf/shelf_model_observer.h" |
| 13 #include "ash/display/window_tree_host_manager.h" | 13 #include "ash/display/window_tree_host_manager.h" |
| 14 #include "ash/public/cpp/shelf_types.h" | 14 #include "ash/public/cpp/shelf_types.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 19 #include "chrome/browser/ui/app_icon_loader.h" | |
| 20 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | 19 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
| 21 #include "chrome/browser/ui/ash/app_sync_ui_state_observer.h" | 20 #include "chrome/browser/ui/ash/app_sync_ui_state_observer.h" |
| 22 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 23 #include "chrome/browser/ui/ash/launcher/launcher_app_updater.h" | 22 #include "chrome/browser/ui/ash/launcher/launcher_app_updater.h" |
| 24 #include "components/prefs/pref_change_registrar.h" | 23 #include "components/prefs/pref_change_registrar.h" |
| 25 #include "ui/aura/window_observer.h" | 24 #include "ui/aura/window_observer.h" |
| 26 | 25 |
| 27 class AppSyncUIState; | 26 class AppSyncUIState; |
| 28 class BrowserStatusMonitor; | 27 class BrowserStatusMonitor; |
| 29 class LauncherControllerHelper; | |
| 30 class Profile; | 28 class Profile; |
| 31 class AppWindowLauncherController; | 29 class AppWindowLauncherController; |
| 32 class TabContents; | 30 class TabContents; |
| 33 | 31 |
| 34 namespace ash { | 32 namespace ash { |
| 35 class ShelfModel; | 33 class ShelfModel; |
| 36 namespace launcher { | 34 namespace launcher { |
| 37 class ChromeLauncherPrefsObserver; | 35 class ChromeLauncherPrefsObserver; |
| 38 } | 36 } |
| 39 } | 37 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 55 // Implementation of ChromeLauncherController, used for classic Ash. | 53 // Implementation of ChromeLauncherController, used for classic Ash. |
| 56 // In addition to implementing ChromeLauncherController, this class performs | 54 // In addition to implementing ChromeLauncherController, this class performs |
| 57 // a lot of other responsibilities, such as implementing ash::ShelfDelegate, | 55 // a lot of other responsibilities, such as implementing ash::ShelfDelegate, |
| 58 // updating the UI state and the shelf model when apps are uninstalled, etc. | 56 // updating the UI state and the shelf model when apps are uninstalled, etc. |
| 59 class ChromeLauncherControllerImpl | 57 class ChromeLauncherControllerImpl |
| 60 : public ChromeLauncherController, | 58 : public ChromeLauncherController, |
| 61 public ash::ShelfDelegate, | 59 public ash::ShelfDelegate, |
| 62 public LauncherAppUpdater::Delegate, | 60 public LauncherAppUpdater::Delegate, |
| 63 private ash::ShelfModelObserver, | 61 private ash::ShelfModelObserver, |
| 64 private ash::WindowTreeHostManager::Observer, | 62 private ash::WindowTreeHostManager::Observer, |
| 65 private AppIconLoaderDelegate, | |
| 66 private AppSyncUIStateObserver, | 63 private AppSyncUIStateObserver, |
| 67 private app_list::AppListSyncableService::Observer { | 64 private app_list::AppListSyncableService::Observer { |
| 68 public: | 65 public: |
| 69 ChromeLauncherControllerImpl(Profile* profile, ash::ShelfModel* model); | 66 ChromeLauncherControllerImpl(Profile* profile, ash::ShelfModel* model); |
| 70 ~ChromeLauncherControllerImpl() override; | 67 ~ChromeLauncherControllerImpl() override; |
| 71 | 68 |
| 72 // Create ChromeLauncherControllerImpl instance and set is as the | |
| 73 // ChromeLauncherController singleton. | |
| 74 static ChromeLauncherControllerImpl* CreateInstance(Profile* profile, | |
| 75 ash::ShelfModel* model); | |
| 76 | |
| 77 // ChromeLauncherController: | 69 // ChromeLauncherController: |
| 78 void Init() override; | 70 void Init() override; |
| 79 ash::ShelfID CreateAppLauncherItem(LauncherItemController* controller, | 71 ash::ShelfID CreateAppLauncherItem(LauncherItemController* controller, |
| 80 const std::string& app_id, | 72 const std::string& app_id, |
| 81 ash::ShelfItemStatus status) override; | 73 ash::ShelfItemStatus status) override; |
| 82 void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) override; | 74 void SetItemStatus(ash::ShelfID id, ash::ShelfItemStatus status) override; |
| 83 void SetItemController(ash::ShelfID id, | 75 void SetItemController(ash::ShelfID id, |
| 84 LauncherItemController* controller) override; | 76 LauncherItemController* controller) override; |
| 85 void CloseLauncherItem(ash::ShelfID id) override; | 77 void CloseLauncherItem(ash::ShelfID id) override; |
| 86 void Pin(ash::ShelfID id) override; | 78 void Pin(ash::ShelfID id) override; |
| 87 void Unpin(ash::ShelfID id) override; | 79 void Unpin(ash::ShelfID id) override; |
| 88 bool IsPinned(ash::ShelfID id) override; | 80 bool IsPinned(ash::ShelfID id) override; |
| 89 void TogglePinned(ash::ShelfID id) override; | 81 void TogglePinned(ash::ShelfID id) override; |
| 90 bool IsPinnable(ash::ShelfID id) const override; | 82 bool IsPinnable(ash::ShelfID id) const override; |
| 91 void LockV1AppWithID(const std::string& app_id) override; | 83 void LockV1AppWithID(const std::string& app_id) override; |
| 92 void UnlockV1AppWithID(const std::string& app_id) override; | 84 void UnlockV1AppWithID(const std::string& app_id) override; |
| 93 void Launch(ash::ShelfID id, int event_flags) override; | 85 void Launch(ash::ShelfID id, int event_flags) override; |
| 94 void Close(ash::ShelfID id) override; | 86 void Close(ash::ShelfID id) override; |
| 95 bool IsOpen(ash::ShelfID id) override; | 87 bool IsOpen(ash::ShelfID id) override; |
| 96 bool IsPlatformApp(ash::ShelfID id) override; | 88 bool IsPlatformApp(ash::ShelfID id) override; |
| 97 void LaunchApp(const std::string& app_id, | |
| 98 ash::LaunchSource source, | |
| 99 int event_flags) override; | |
| 100 void ActivateApp(const std::string& app_id, | 89 void ActivateApp(const std::string& app_id, |
| 101 ash::LaunchSource source, | 90 ash::LaunchSource source, |
| 102 int event_flags) override; | 91 int event_flags) override; |
| 103 extensions::LaunchType GetLaunchType(ash::ShelfID id) override; | 92 extensions::LaunchType GetLaunchType(ash::ShelfID id) override; |
| 104 void SetLauncherItemImage(ash::ShelfID shelf_id, | 93 void SetLauncherItemImage(ash::ShelfID shelf_id, |
| 105 const gfx::ImageSkia& image) override; | 94 const gfx::ImageSkia& image) override; |
| 106 bool IsWindowedAppInLauncher(const std::string& app_id) override; | 95 bool IsWindowedAppInLauncher(const std::string& app_id) override; |
| 107 void SetLaunchType(ash::ShelfID id, | 96 void SetLaunchType(ash::ShelfID id, |
| 108 extensions::LaunchType launch_type) override; | 97 extensions::LaunchType launch_type) override; |
| 109 Profile* GetProfile() override; | |
| 110 void UpdateAppState(content::WebContents* contents, | 98 void UpdateAppState(content::WebContents* contents, |
| 111 AppState app_state) override; | 99 AppState app_state) override; |
| 112 ash::ShelfID GetShelfIDForWebContents( | 100 ash::ShelfID GetShelfIDForWebContents( |
| 113 content::WebContents* contents) override; | 101 content::WebContents* contents) override; |
| 114 void SetRefocusURLPatternForTest(ash::ShelfID id, const GURL& url) override; | 102 void SetRefocusURLPatternForTest(ash::ShelfID id, const GURL& url) override; |
| 115 ash::ShelfItemDelegate::PerformedAction ActivateWindowOrMinimizeIfActive( | 103 ash::ShelfItemDelegate::PerformedAction ActivateWindowOrMinimizeIfActive( |
| 116 ui::BaseWindow* window, | 104 ui::BaseWindow* window, |
| 117 bool allow_minimize) override; | 105 bool allow_minimize) override; |
| 118 void ActiveUserChanged(const std::string& user_email) override; | 106 void ActiveUserChanged(const std::string& user_email) override; |
| 119 void AdditionalUserAddedToSession(Profile* profile) override; | 107 void AdditionalUserAddedToSession(Profile* profile) override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 131 content::WebContents* web_contents) const override; | 119 content::WebContents* web_contents) const override; |
| 132 BrowserShortcutLauncherItemController* | 120 BrowserShortcutLauncherItemController* |
| 133 GetBrowserShortcutLauncherItemController() override; | 121 GetBrowserShortcutLauncherItemController() override; |
| 134 LauncherItemController* GetLauncherItemController( | 122 LauncherItemController* GetLauncherItemController( |
| 135 const ash::ShelfID id) override; | 123 const ash::ShelfID id) override; |
| 136 bool ShelfBoundsChangesProbablyWithUser( | 124 bool ShelfBoundsChangesProbablyWithUser( |
| 137 ash::WmShelf* shelf, | 125 ash::WmShelf* shelf, |
| 138 const AccountId& account_id) const override; | 126 const AccountId& account_id) const override; |
| 139 void OnUserProfileReadyToSwitch(Profile* profile) override; | 127 void OnUserProfileReadyToSwitch(Profile* profile) override; |
| 140 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override; | 128 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override; |
| 141 | 129 void AttachProfile(Profile* profile_to_attach) override; |
| 142 void SetProfileForTest(Profile* profile); | |
| 143 | 130 |
| 144 // Access to the BrowserStatusMonitor for tests. | 131 // Access to the BrowserStatusMonitor for tests. |
| 145 BrowserStatusMonitor* browser_status_monitor_for_test() { | 132 BrowserStatusMonitor* browser_status_monitor_for_test() { |
| 146 return browser_status_monitor_.get(); | 133 return browser_status_monitor_.get(); |
| 147 } | 134 } |
| 148 | 135 |
| 149 // Access to the AppWindowLauncherController list for tests. | 136 // Access to the AppWindowLauncherController list for tests. |
| 150 const std::vector<std::unique_ptr<AppWindowLauncherController>>& | 137 const std::vector<std::unique_ptr<AppWindowLauncherController>>& |
| 151 app_window_controllers_for_test() { | 138 app_window_controllers_for_test() { |
| 152 return app_window_controllers_; | 139 return app_window_controllers_; |
| 153 } | 140 } |
| 154 | 141 |
| 155 // ash::ShelfDelegate: | 142 // ash::ShelfDelegate: |
| 156 void OnShelfCreated(ash::WmShelf* shelf) override; | |
| 157 void OnShelfDestroyed(ash::WmShelf* shelf) override; | |
| 158 void OnShelfAlignmentChanged(ash::WmShelf* shelf) override; | |
| 159 void OnShelfAutoHideBehaviorChanged(ash::WmShelf* shelf) override; | |
| 160 void OnShelfAutoHideStateChanged(ash::WmShelf* shelf) override; | |
| 161 void OnShelfVisibilityStateChanged(ash::WmShelf* shelf) override; | |
| 162 ash::ShelfID GetShelfIDForAppID(const std::string& app_id) override; | 143 ash::ShelfID GetShelfIDForAppID(const std::string& app_id) override; |
| 163 ash::ShelfID GetShelfIDForAppIDAndLaunchID( | 144 ash::ShelfID GetShelfIDForAppIDAndLaunchID( |
| 164 const std::string& app_id, | 145 const std::string& app_id, |
| 165 const std::string& launch_id) override; | 146 const std::string& launch_id) override; |
| 166 bool HasShelfIDToAppIDMapping(ash::ShelfID id) const override; | 147 bool HasShelfIDToAppIDMapping(ash::ShelfID id) const override; |
| 167 const std::string& GetAppIDForShelfID(ash::ShelfID id) override; | 148 const std::string& GetAppIDForShelfID(ash::ShelfID id) override; |
| 168 void PinAppWithID(const std::string& app_id) override; | 149 void PinAppWithID(const std::string& app_id) override; |
| 169 bool IsAppPinned(const std::string& app_id) override; | 150 bool IsAppPinned(const std::string& app_id) override; |
| 170 void UnpinAppWithID(const std::string& app_id) override; | 151 void UnpinAppWithID(const std::string& app_id) override; |
| 171 | 152 |
| 172 // LauncherAppUpdater::Delegate: | 153 // LauncherAppUpdater::Delegate: |
| 173 void OnAppInstalled(content::BrowserContext* browser_context, | 154 void OnAppInstalled(content::BrowserContext* browser_context, |
| 174 const std::string& app_id) override; | 155 const std::string& app_id) override; |
| 175 void OnAppUpdated(content::BrowserContext* browser_context, | 156 void OnAppUpdated(content::BrowserContext* browser_context, |
| 176 const std::string& app_id) override; | 157 const std::string& app_id) override; |
| 177 void OnAppUninstalledPrepared(content::BrowserContext* browser_context, | 158 void OnAppUninstalledPrepared(content::BrowserContext* browser_context, |
| 178 const std::string& app_id) override; | 159 const std::string& app_id) override; |
| 179 | 160 |
| 180 protected: | 161 protected: |
| 181 // Creates a new app shortcut item and controller on the shelf at |index|. | 162 // Creates a new app shortcut item and controller on the shelf at |index|. |
| 182 // Use kInsertItemAtEnd to add a shortcut as the last item. | 163 // Use kInsertItemAtEnd to add a shortcut as the last item. |
| 183 ash::ShelfID CreateAppShortcutLauncherItem(const std::string& app_id, | 164 ash::ShelfID CreateAppShortcutLauncherItem(const std::string& app_id, |
| 184 int index); | 165 int index); |
| 185 | 166 |
| 186 // Sets LauncherControllerHelper/AppIconLoader for test, taking ownership. | |
| 187 void SetLauncherControllerHelperForTest(LauncherControllerHelper* helper); | |
| 188 void SetAppIconLoadersForTest( | |
| 189 std::vector<std::unique_ptr<AppIconLoader>>& loaders); | |
| 190 const std::string& GetAppIdFromShelfIdForTest(ash::ShelfID id); | 167 const std::string& GetAppIdFromShelfIdForTest(ash::ShelfID id); |
| 191 | 168 |
| 192 private: | 169 private: |
| 193 friend class ChromeLauncherControllerImplTest; | 170 friend class ChromeLauncherControllerImplTest; |
| 194 friend class ShelfAppBrowserTest; | 171 friend class ShelfAppBrowserTest; |
| 195 friend class LauncherPlatformAppBrowserTest; | 172 friend class LauncherPlatformAppBrowserTest; |
| 196 FRIEND_TEST_ALL_PREFIXES(ChromeLauncherControllerImplTest, AppPanels); | 173 FRIEND_TEST_ALL_PREFIXES(ChromeLauncherControllerImplTest, AppPanels); |
| 197 | 174 |
| 198 typedef std::map<ash::ShelfID, LauncherItemController*> IDToItemControllerMap; | 175 typedef std::map<ash::ShelfID, LauncherItemController*> IDToItemControllerMap; |
| 199 typedef std::map<content::WebContents*, std::string> WebContentsToAppIDMap; | 176 typedef std::map<content::WebContents*, std::string> WebContentsToAppIDMap; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 229 | 206 |
| 230 // Updates pin position for the item specified by |id| in sync model. | 207 // Updates pin position for the item specified by |id| in sync model. |
| 231 void SyncPinPosition(ash::ShelfID id); | 208 void SyncPinPosition(ash::ShelfID id); |
| 232 | 209 |
| 233 // Re-syncs shelf model. | 210 // Re-syncs shelf model. |
| 234 void UpdateAppLaunchersFromPref(); | 211 void UpdateAppLaunchersFromPref(); |
| 235 | 212 |
| 236 // Schedules re-sync of shelf model. | 213 // Schedules re-sync of shelf model. |
| 237 void ScheduleUpdateAppLaunchersFromPref(); | 214 void ScheduleUpdateAppLaunchersFromPref(); |
| 238 | 215 |
| 239 // Sets the shelf auto-hide behavior from prefs. | |
| 240 void SetShelfAutoHideBehaviorFromPrefs(); | |
| 241 | |
| 242 // Sets the shelf alignment from prefs. | |
| 243 void SetShelfAlignmentFromPrefs(); | |
| 244 | |
| 245 // Sets both of auto-hide behavior and alignment from prefs. | |
| 246 void SetShelfBehaviorsFromPrefs(); | |
| 247 | |
| 248 // Sets whether the virtual keyboard is enabled from prefs. | 216 // Sets whether the virtual keyboard is enabled from prefs. |
| 249 void SetVirtualKeyboardBehaviorFromPrefs(); | 217 void SetVirtualKeyboardBehaviorFromPrefs(); |
| 250 | 218 |
| 251 // Returns the shelf item status for the given |app_id|, which can be either | 219 // Returns the shelf item status for the given |app_id|, which can be either |
| 252 // STATUS_ACTIVE (if the app is active), STATUS_RUNNING (if there is such an | 220 // STATUS_ACTIVE (if the app is active), STATUS_RUNNING (if there is such an |
| 253 // app) or STATUS_CLOSED. | 221 // app) or STATUS_CLOSED. |
| 254 ash::ShelfItemStatus GetAppState(const std::string& app_id); | 222 ash::ShelfItemStatus GetAppState(const std::string& app_id); |
| 255 | 223 |
| 256 // Creates an app launcher to insert at |index|. Note that |index| may be | 224 // Creates an app launcher to insert at |index|. Note that |index| may be |
| 257 // adjusted by the model to meet ordering constraints. | 225 // adjusted by the model to meet ordering constraints. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 278 // Close all windowed V1 applications of a certain extension which was already | 246 // Close all windowed V1 applications of a certain extension which was already |
| 279 // deleted. | 247 // deleted. |
| 280 void CloseWindowedAppsFromRemovedExtension(const std::string& app_id, | 248 void CloseWindowedAppsFromRemovedExtension(const std::string& app_id, |
| 281 const Profile* profile); | 249 const Profile* profile); |
| 282 | 250 |
| 283 // Set ShelfItemDelegate |item_delegate| for |id| and take an ownership. | 251 // Set ShelfItemDelegate |item_delegate| for |id| and take an ownership. |
| 284 // TODO(simon.hong81): Make this take a scoped_ptr of |item_delegate|. | 252 // TODO(simon.hong81): Make this take a scoped_ptr of |item_delegate|. |
| 285 void SetShelfItemDelegate(ash::ShelfID id, | 253 void SetShelfItemDelegate(ash::ShelfID id, |
| 286 ash::ShelfItemDelegate* item_delegate); | 254 ash::ShelfItemDelegate* item_delegate); |
| 287 | 255 |
| 288 // Attach to a specific profile. | |
| 289 void AttachProfile(Profile* profile); | |
| 290 | |
| 291 // Forget the current profile to allow attaching to a new one. | 256 // Forget the current profile to allow attaching to a new one. |
| 292 void ReleaseProfile(); | 257 void ReleaseProfile(); |
| 293 | 258 |
| 294 AppIconLoader* GetAppIconLoaderForApp(const std::string& app_id); | |
| 295 | |
| 296 // ash::ShelfModelObserver: | 259 // ash::ShelfModelObserver: |
| 297 void ShelfItemAdded(int index) override; | 260 void ShelfItemAdded(int index) override; |
| 298 void ShelfItemRemoved(int index, ash::ShelfID id) override; | 261 void ShelfItemRemoved(int index, ash::ShelfID id) override; |
| 299 void ShelfItemMoved(int start_index, int target_index) override; | 262 void ShelfItemMoved(int start_index, int target_index) override; |
| 300 void ShelfItemChanged(int index, const ash::ShelfItem& old_item) override; | 263 void ShelfItemChanged(int index, const ash::ShelfItem& old_item) override; |
| 301 void OnSetShelfItemDelegate(ash::ShelfID id, | 264 void OnSetShelfItemDelegate(ash::ShelfID id, |
| 302 ash::ShelfItemDelegate* item_delegate) override; | 265 ash::ShelfItemDelegate* item_delegate) override; |
| 303 | 266 |
| 304 // ash::WindowTreeHostManager::Observer: | 267 // ash::WindowTreeHostManager::Observer: |
| 305 void OnDisplayConfigurationChanged() override; | 268 void OnDisplayConfigurationChanged() override; |
| 306 | 269 |
| 307 // AppSyncUIStateObserver: | 270 // AppSyncUIStateObserver: |
| 308 void OnAppSyncUIStatusChanged() override; | 271 void OnAppSyncUIStatusChanged() override; |
| 309 | 272 |
| 310 // AppIconLoaderDelegate: | 273 // AppIconLoaderDelegate: |
| 311 void OnAppImageUpdated(const std::string& app_id, | 274 void OnAppImageUpdated(const std::string& app_id, |
| 312 const gfx::ImageSkia& image) override; | 275 const gfx::ImageSkia& image) override; |
| 313 | 276 |
| 314 // app_list::AppListSyncableService::Observer: | 277 // app_list::AppListSyncableService::Observer: |
| 315 void OnSyncModelUpdated() override; | 278 void OnSyncModelUpdated() override; |
| 316 | 279 |
| 317 // Unpins shelf item and optionally updates pin prefs when |update_prefs| is | 280 // Unpins shelf item and optionally updates pin prefs when |update_prefs| is |
| 318 // set to true. | 281 // set to true. |
| 319 void UnpinAndUpdatePrefs(ash::ShelfID id, bool update_prefs); | 282 void UnpinAndUpdatePrefs(ash::ShelfID id, bool update_prefs); |
| 320 | 283 |
| 321 ash::ShelfModel* model_; | 284 ash::ShelfModel* model_; |
| 322 | 285 |
| 323 // Profile used for prefs and loading extensions. This is NOT necessarily the | |
| 324 // profile new windows are created with. | |
| 325 Profile* profile_; | |
| 326 | |
| 327 // Controller items in this map are owned by |ShelfModel|. | 286 // Controller items in this map are owned by |ShelfModel|. |
| 328 IDToItemControllerMap id_to_item_controller_map_; | 287 IDToItemControllerMap id_to_item_controller_map_; |
| 329 | 288 |
| 330 // Direct access to app_id for a web contents. | 289 // Direct access to app_id for a web contents. |
| 331 WebContentsToAppIDMap web_contents_to_app_id_; | 290 WebContentsToAppIDMap web_contents_to_app_id_; |
| 332 | 291 |
| 333 // Used to track app windows. | 292 // Used to track app windows. |
| 334 std::vector<std::unique_ptr<AppWindowLauncherController>> | 293 std::vector<std::unique_ptr<AppWindowLauncherController>> |
| 335 app_window_controllers_; | 294 app_window_controllers_; |
| 336 | 295 |
| 337 // Used to get app info for tabs. | |
| 338 std::unique_ptr<LauncherControllerHelper> launcher_controller_helper_; | |
| 339 | |
| 340 // Used to load the images for app items. | |
| 341 std::vector<std::unique_ptr<AppIconLoader>> app_icon_loaders_; | |
| 342 | |
| 343 // Used to handle app load/unload events. | 296 // Used to handle app load/unload events. |
| 344 std::vector<std::unique_ptr<LauncherAppUpdater>> app_updaters_; | 297 std::vector<std::unique_ptr<LauncherAppUpdater>> app_updaters_; |
| 345 | 298 |
| 346 PrefChangeRegistrar pref_change_registrar_; | 299 PrefChangeRegistrar pref_change_registrar_; |
| 347 | 300 |
| 348 AppSyncUIState* app_sync_ui_state_ = nullptr; | 301 AppSyncUIState* app_sync_ui_state_ = nullptr; |
| 349 | 302 |
| 350 // The owned browser status monitor. | 303 // The owned browser status monitor. |
| 351 std::unique_ptr<BrowserStatusMonitor> browser_status_monitor_; | 304 std::unique_ptr<BrowserStatusMonitor> browser_status_monitor_; |
| 352 | 305 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 366 typedef std::vector<std::string> RunningAppListIds; | 319 typedef std::vector<std::string> RunningAppListIds; |
| 367 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; | 320 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; |
| 368 RunningAppListIdMap last_used_running_application_order_; | 321 RunningAppListIdMap last_used_running_application_order_; |
| 369 | 322 |
| 370 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_; | 323 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_; |
| 371 | 324 |
| 372 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); | 325 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); |
| 373 }; | 326 }; |
| 374 | 327 |
| 375 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ | 328 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
| OLD | NEW |