Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_LAUNCHER_LAUNCHER_DELEGATE_PROXY_H_ | |
| 6 #define ASH_LAUNCHER_LAUNCHER_DELEGATE_PROXY_H_ | |
| 7 | |
| 8 #include "ash/launcher/launcher_delegate.h" | |
| 9 #include "base/compiler_specific.h" | |
| 10 | |
| 11 namespace ash { | |
| 12 class LauncherItemDelegate; | |
| 13 | |
| 14 namespace internal { | |
| 15 class AppListLauncherItemDelegate; | |
| 16 | |
| 17 // LauncherDelegateProxy helps Launcher/LauncherView to choose right | |
| 18 // LauncherItemDelegate of LauncherItem. | |
| 19 class LauncherDelegateProxy : public ash::LauncherDelegate { | |
|
sky
2013/08/23 20:23:14
I think what you need is a class that lets you reg
simonhong_
2013/08/26 08:47:10
Done.
| |
| 20 public: | |
| 21 LauncherDelegateProxy(); | |
| 22 virtual ~LauncherDelegateProxy(); | |
| 23 | |
| 24 // LauncherDelegate overrides: | |
| 25 virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE; | |
| 26 virtual void OnLauncherCreated(Launcher* launcher) OVERRIDE; | |
| 27 virtual void OnLauncherDestroyed(Launcher* launcher) OVERRIDE; | |
| 28 virtual LauncherID GetLauncherIDForAppID(const std::string& app_id) OVERRIDE; | |
| 29 virtual void PinAppWithID(const std::string& app_id) OVERRIDE; | |
| 30 virtual bool IsAppPinned(const std::string& app_id) OVERRIDE; | |
| 31 virtual void UnpinAppsWithID(const std::string& app_id) OVERRIDE; | |
| 32 virtual LauncherItemDelegate* GetLauncherItemDelegate( | |
| 33 const LauncherItem& item) OVERRIDE; | |
| 34 | |
| 35 private: | |
| 36 scoped_ptr<LauncherDelegate> chrome_launcher_delegate_; | |
|
sky
2013/08/23 20:23:14
This shouldn't be named chrome.
simonhong_
2013/08/26 08:47:10
Removed.
| |
| 37 scoped_ptr<AppListLauncherItemDelegate> app_list_launcher_item_delegate_; | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(LauncherDelegateProxy); | |
| 40 }; | |
| 41 | |
| 42 } // namespace internal | |
| 43 } // namespace ash | |
| 44 | |
| 45 #endif // ASH_LAUNCHER_LAUNCHER_DELEGATE_PROXY_H_ | |
| OLD | NEW |