| 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 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 void ActivateShellApp(const std::string& app_id, int index) override; | 125 void ActivateShellApp(const std::string& app_id, int index) override; |
| 126 bool IsWebContentHandledByApplication(content::WebContents* web_contents, | 126 bool IsWebContentHandledByApplication(content::WebContents* web_contents, |
| 127 const std::string& app_id) override; | 127 const std::string& app_id) override; |
| 128 bool ContentCanBeHandledByGmailApp( | 128 bool ContentCanBeHandledByGmailApp( |
| 129 content::WebContents* web_contents) override; | 129 content::WebContents* web_contents) override; |
| 130 gfx::Image GetAppListIcon(content::WebContents* web_contents) const override; | 130 gfx::Image GetAppListIcon(content::WebContents* web_contents) const override; |
| 131 base::string16 GetAppListTitle( | 131 base::string16 GetAppListTitle( |
| 132 content::WebContents* web_contents) const override; | 132 content::WebContents* web_contents) const override; |
| 133 BrowserShortcutLauncherItemController* | 133 BrowserShortcutLauncherItemController* |
| 134 GetBrowserShortcutLauncherItemController() override; | 134 GetBrowserShortcutLauncherItemController() override; |
| 135 void MayUpdateBrowserShortcutItem() override; |
| 135 LauncherItemController* GetLauncherItemController( | 136 LauncherItemController* GetLauncherItemController( |
| 136 const ash::ShelfID id) override; | 137 const ash::ShelfID id) override; |
| 137 bool IsBrowserFromActiveUser(Browser* browser) override; | 138 bool IsBrowserFromActiveUser(Browser* browser) override; |
| 138 bool ShelfBoundsChangesProbablyWithUser( | 139 bool ShelfBoundsChangesProbablyWithUser( |
| 139 ash::Shelf* shelf, | 140 ash::Shelf* shelf, |
| 140 const std::string& user_id) const override; | 141 const std::string& user_id) const override; |
| 141 void OnUserProfileReadyToSwitch(Profile* profile) override; | 142 void OnUserProfileReadyToSwitch(Profile* profile) override; |
| 142 AppListControllerDelegate::Pinnable GetPinnable( | 143 AppListControllerDelegate::Pinnable GetPinnable( |
| 143 const std::string& app_id) override; | 144 const std::string& app_id) override; |
| 144 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override; | 145 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 165 const std::string& GetAppIDForShelfID(ash::ShelfID id) override; | 166 const std::string& GetAppIDForShelfID(ash::ShelfID id) override; |
| 166 void PinAppWithID(const std::string& app_id) override; | 167 void PinAppWithID(const std::string& app_id) override; |
| 167 bool IsAppPinned(const std::string& app_id) override; | 168 bool IsAppPinned(const std::string& app_id) override; |
| 168 void UnpinAppWithID(const std::string& app_id) override; | 169 void UnpinAppWithID(const std::string& app_id) override; |
| 169 | 170 |
| 170 // LauncherAppUpdater::Delegate: | 171 // LauncherAppUpdater::Delegate: |
| 171 void OnAppInstalled(content::BrowserContext* browser_context, | 172 void OnAppInstalled(content::BrowserContext* browser_context, |
| 172 const std::string& app_id) override; | 173 const std::string& app_id) override; |
| 173 void OnAppUpdated(content::BrowserContext* browser_context, | 174 void OnAppUpdated(content::BrowserContext* browser_context, |
| 174 const std::string& app_id) override; | 175 const std::string& app_id) override; |
| 175 void OnAppUninstalled(content::BrowserContext* browser_context, | 176 void OnAppUninstalledPrepared(content::BrowserContext* browser_context, |
| 176 const std::string& app_id) override; | 177 const std::string& app_id) override; |
| 177 | 178 |
| 178 protected: | 179 protected: |
| 179 // Creates a new app shortcut item and controller on the shelf at |index|. | 180 // Creates a new app shortcut item and controller on the shelf at |index|. |
| 180 // Use kInsertItemAtEnd to add a shortcut as the last item. | 181 // Use kInsertItemAtEnd to add a shortcut as the last item. |
| 181 ash::ShelfID CreateAppShortcutLauncherItem(const std::string& app_id, | 182 ash::ShelfID CreateAppShortcutLauncherItem(const std::string& app_id, |
| 182 int index); | 183 int index); |
| 183 | 184 |
| 184 // Sets LauncherControllerHelper/AppIconLoader for test, taking ownership. | 185 // Sets LauncherControllerHelper/AppIconLoader for test, taking ownership. |
| 185 void SetLauncherControllerHelperForTest(LauncherControllerHelper* helper); | 186 void SetLauncherControllerHelperForTest(LauncherControllerHelper* helper); |
| 186 void SetAppIconLoadersForTest( | 187 void SetAppIconLoadersForTest( |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 // The list of running & un-pinned applications for different users on hidden | 378 // The list of running & un-pinned applications for different users on hidden |
| 378 // desktops. | 379 // desktops. |
| 379 typedef std::vector<std::string> RunningAppListIds; | 380 typedef std::vector<std::string> RunningAppListIds; |
| 380 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; | 381 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; |
| 381 RunningAppListIdMap last_used_running_application_order_; | 382 RunningAppListIdMap last_used_running_application_order_; |
| 382 | 383 |
| 383 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); | 384 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); |
| 384 }; | 385 }; |
| 385 | 386 |
| 386 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ | 387 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
| OLD | NEW |