| 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 "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 | 10 |
| 11 namespace aura { | 11 namespace aura { |
| 12 class Window; | 12 class Window; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace ash { | 15 namespace ash { |
| 16 namespace shell { | 16 namespace shell { |
| 17 | 17 |
| 18 class WindowWatcher; | 18 class WindowWatcher; |
| 19 | 19 |
| 20 class LauncherDelegateImpl : public ash::LauncherDelegate { | 20 class LauncherDelegateImpl : public ash::LauncherDelegate { |
| 21 public: | 21 public: |
| 22 explicit LauncherDelegateImpl(WindowWatcher* watcher); | 22 explicit LauncherDelegateImpl(WindowWatcher* watcher); |
| 23 virtual ~LauncherDelegateImpl(); | 23 virtual ~LauncherDelegateImpl(); |
| 24 | 24 |
| 25 void set_watcher(WindowWatcher* watcher) { watcher_ = watcher; } | 25 void set_watcher(WindowWatcher* watcher) { watcher_ = watcher; } |
| 26 | 26 |
| 27 // LauncherDelegate overrides: | 27 // LauncherDelegate overrides: |
| 28 virtual void OnBrowserShortcutClicked(int event_flags) OVERRIDE; | 28 virtual void OnBrowserShortcutClicked(int event_flags) OVERRIDE; |
| 29 virtual void ItemClicked(const ash::LauncherItem& item, | 29 virtual void ItemClicked(const ash::LauncherItem& item, |
| 30 int event_flags) OVERRIDE; | 30 const ui::Event& event) OVERRIDE; |
| 31 virtual int GetBrowserShortcutResourceId() OVERRIDE; | 31 virtual int GetBrowserShortcutResourceId() OVERRIDE; |
| 32 virtual string16 GetTitle(const ash::LauncherItem& item) OVERRIDE; | 32 virtual string16 GetTitle(const ash::LauncherItem& item) OVERRIDE; |
| 33 virtual ui::MenuModel* CreateContextMenu( | 33 virtual ui::MenuModel* CreateContextMenu( |
| 34 const ash::LauncherItem& item, | 34 const ash::LauncherItem& item, |
| 35 aura::RootWindow* root) OVERRIDE; | 35 aura::RootWindow* root) OVERRIDE; |
| 36 virtual ui::MenuModel* CreateApplicationMenu( | 36 virtual ui::MenuModel* CreateApplicationMenu( |
| 37 const ash::LauncherItem&) OVERRIDE; | 37 const ash::LauncherItem&) OVERRIDE; |
| 38 virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE; | 38 virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE; |
| 39 virtual bool IsDraggable(const ash::LauncherItem& item) OVERRIDE; | 39 virtual bool IsDraggable(const ash::LauncherItem& item) OVERRIDE; |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 // Used to update Launcher. Owned by main. | 42 // Used to update Launcher. Owned by main. |
| 43 WindowWatcher* watcher_; | 43 WindowWatcher* watcher_; |
| 44 | 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(LauncherDelegateImpl); | 45 DISALLOW_COPY_AND_ASSIGN(LauncherDelegateImpl); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 } // namespace shell | 48 } // namespace shell |
| 49 } // namespace ash | 49 } // namespace ash |
| 50 | 50 |
| 51 #endif // ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_ | 51 #endif // ASH_SHELL_LAUNCHER_DELEGATE_IMPL_H_ |
| OLD | NEW |