| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/launcher/launcher_delegate.h" | 10 #include "ash/launcher/launcher_delegate.h" |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 const ash::LauncherItem& item, aura::RootWindow* root) OVERRIDE = 0; | 275 const ash::LauncherItem& item, aura::RootWindow* root) OVERRIDE = 0; |
| 276 virtual ui::MenuModel* CreateApplicationMenu( | 276 virtual ui::MenuModel* CreateApplicationMenu( |
| 277 const ash::LauncherItem& item) OVERRIDE = 0; | 277 const ash::LauncherItem& item) OVERRIDE = 0; |
| 278 virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE = 0; | 278 virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE = 0; |
| 279 virtual bool IsDraggable(const ash::LauncherItem& item) OVERRIDE = 0; | 279 virtual bool IsDraggable(const ash::LauncherItem& item) OVERRIDE = 0; |
| 280 | 280 |
| 281 protected: | 281 protected: |
| 282 friend class BrowserLauncherItemControllerTest; | 282 friend class BrowserLauncherItemControllerTest; |
| 283 friend class LauncherPlatformAppBrowserTest; | 283 friend class LauncherPlatformAppBrowserTest; |
| 284 friend class LauncherAppBrowserTest; | 284 friend class LauncherAppBrowserTest; |
| 285 // TODO(skuhne): Remove these when the old launcher get removed. |
| 286 friend class LauncherPlatformPerAppAppBrowserTest; |
| 287 friend class LauncherPerAppAppBrowserTest; |
| 285 | 288 |
| 286 // Creates a new app shortcut item and controller on the launcher at |index|. | 289 // Creates a new app shortcut item and controller on the launcher at |index|. |
| 287 // Use kInsertItemAtEnd to add a shortcut as the last item. | 290 // Use kInsertItemAtEnd to add a shortcut as the last item. |
| 288 virtual ash::LauncherID CreateAppShortcutLauncherItem( | 291 virtual ash::LauncherID CreateAppShortcutLauncherItem( |
| 289 const std::string& app_id, | 292 const std::string& app_id, |
| 290 int index) = 0; | 293 int index) = 0; |
| 291 | 294 |
| 292 // Sets the AppTabHelper/AppIconLoader, taking ownership of the helper class. | 295 // Sets the AppTabHelper/AppIconLoader, taking ownership of the helper class. |
| 293 // These are intended for testing. | 296 // These are intended for testing. |
| 294 virtual void SetAppTabHelperForTest(AppTabHelper* helper) = 0; | 297 virtual void SetAppTabHelperForTest(AppTabHelper* helper) = 0; |
| 295 virtual void SetAppIconLoaderForTest(AppIconLoader* loader) = 0; | 298 virtual void SetAppIconLoaderForTest(AppIconLoader* loader) = 0; |
| 296 virtual const std::string& GetAppIdFromLauncherIdForTest( | 299 virtual const std::string& GetAppIdFromLauncherIdForTest( |
| 297 ash::LauncherID id) = 0; | 300 ash::LauncherID id) = 0; |
| 298 | 301 |
| 299 private: | 302 private: |
| 300 static ChromeLauncherController* instance_; | 303 static ChromeLauncherController* instance_; |
| 301 }; | 304 }; |
| 302 | 305 |
| 303 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ | 306 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ |
| OLD | NEW |