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