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