| 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 ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_ | 5 #ifndef ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_ |
| 6 #define ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_ | 6 #define ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_ |
| 7 | 7 |
| 8 #include "ash/launcher/launcher_delegate.h" | 8 #include "ash/launcher/launcher_delegate.h" |
| 9 #include "ash/launcher/launcher_item_delegate.h" | 9 #include "ash/launcher/launcher_item_delegate.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 void set_watcher(WindowWatcher* watcher) { watcher_ = watcher; } | 27 void set_watcher(WindowWatcher* watcher) { watcher_ = watcher; } |
| 28 | 28 |
| 29 // LauncherDelegate overrides: | 29 // LauncherDelegate overrides: |
| 30 virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE; | 30 virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE; |
| 31 virtual void OnLauncherCreated(Launcher* launcher) OVERRIDE; | 31 virtual void OnLauncherCreated(Launcher* launcher) OVERRIDE; |
| 32 virtual void OnLauncherDestroyed(Launcher* launcher) OVERRIDE; | 32 virtual void OnLauncherDestroyed(Launcher* launcher) OVERRIDE; |
| 33 virtual LauncherID GetLauncherIDForAppID(const std::string& app_id) OVERRIDE; | 33 virtual LauncherID GetLauncherIDForAppID(const std::string& app_id) OVERRIDE; |
| 34 virtual const std::string& GetAppIDForLauncherID(LauncherID id) OVERRIDE; | 34 virtual const std::string& GetAppIDForLauncherID(LauncherID id) OVERRIDE; |
| 35 virtual void PinAppWithID(const std::string& app_id) OVERRIDE; | 35 virtual void PinAppWithID(const std::string& app_id) OVERRIDE; |
| 36 virtual bool IsAppPinned(const std::string& app_id) OVERRIDE; | 36 virtual bool IsAppPinned(const std::string& app_id) OVERRIDE; |
| 37 virtual bool CanPin() const OVERRIDE; |
| 37 virtual void UnpinAppWithID(const std::string& app_id) OVERRIDE; | 38 virtual void UnpinAppWithID(const std::string& app_id) OVERRIDE; |
| 38 | 39 |
| 39 // LauncherItemDelegate overrides: | 40 // LauncherItemDelegate overrides: |
| 40 virtual void ItemSelected(const ash::LauncherItem& item, | 41 virtual void ItemSelected(const ash::LauncherItem& item, |
| 41 const ui::Event& event) OVERRIDE; | 42 const ui::Event& event) OVERRIDE; |
| 42 virtual base::string16 GetTitle(const ash::LauncherItem& item) OVERRIDE; | 43 virtual base::string16 GetTitle(const ash::LauncherItem& item) OVERRIDE; |
| 43 virtual ui::MenuModel* CreateContextMenu( | 44 virtual ui::MenuModel* CreateContextMenu( |
| 44 const ash::LauncherItem& item, | 45 const ash::LauncherItem& item, |
| 45 aura::RootWindow* root) OVERRIDE; | 46 aura::RootWindow* root) OVERRIDE; |
| 46 virtual ash::LauncherMenuModel* CreateApplicationMenu( | 47 virtual ash::LauncherMenuModel* CreateApplicationMenu( |
| 47 const ash::LauncherItem&, | 48 const ash::LauncherItem&, |
| 48 int event_flags) OVERRIDE; | 49 int event_flags) OVERRIDE; |
| 49 virtual bool IsDraggable(const ash::LauncherItem& item) OVERRIDE; | 50 virtual bool IsDraggable(const ash::LauncherItem& item) OVERRIDE; |
| 50 virtual bool ShouldShowTooltip(const LauncherItem& item) OVERRIDE; | 51 virtual bool ShouldShowTooltip(const LauncherItem& item) OVERRIDE; |
| 51 | 52 |
| 52 private: | 53 private: |
| 53 // Used to update Launcher. Owned by main. | 54 // Used to update Launcher. Owned by main. |
| 54 WindowWatcher* watcher_; | 55 WindowWatcher* watcher_; |
| 55 | 56 |
| 56 DISALLOW_COPY_AND_ASSIGN(LauncherDelegateImpl); | 57 DISALLOW_COPY_AND_ASSIGN(LauncherDelegateImpl); |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 } // namespace shell | 60 } // namespace shell |
| 60 } // namespace ash | 61 } // namespace ash |
| 61 | 62 |
| 62 #endif // ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_ | 63 #endif // ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_ |
| OLD | NEW |