Chromium Code Reviews| Index: ash/launcher/launcher_delegate_proxy.h |
| diff --git a/ash/launcher/launcher_delegate_proxy.h b/ash/launcher/launcher_delegate_proxy.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3b2d28c4633e156b262f4a388732b26f69a190d4 |
| --- /dev/null |
| +++ b/ash/launcher/launcher_delegate_proxy.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ASH_LAUNCHER_LAUNCHER_DELEGATE_PROXY_H_ |
| +#define ASH_LAUNCHER_LAUNCHER_DELEGATE_PROXY_H_ |
| + |
| +#include "ash/launcher/launcher_delegate.h" |
| +#include "base/compiler_specific.h" |
| + |
| +namespace ash { |
| +class LauncherItemDelegate; |
| + |
| +namespace internal { |
| +class AppListLauncherItemDelegate; |
| + |
| +// LauncherDelegateProxy helps Launcher/LauncherView to choose right |
| +// LauncherItemDelegate of LauncherItem. |
| +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.
|
| + public: |
| + LauncherDelegateProxy(); |
| + virtual ~LauncherDelegateProxy(); |
| + |
| + // LauncherDelegate overrides: |
| + virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE; |
| + virtual void OnLauncherCreated(Launcher* launcher) OVERRIDE; |
| + virtual void OnLauncherDestroyed(Launcher* launcher) OVERRIDE; |
| + virtual LauncherID GetLauncherIDForAppID(const std::string& app_id) OVERRIDE; |
| + virtual void PinAppWithID(const std::string& app_id) OVERRIDE; |
| + virtual bool IsAppPinned(const std::string& app_id) OVERRIDE; |
| + virtual void UnpinAppsWithID(const std::string& app_id) OVERRIDE; |
| + virtual LauncherItemDelegate* GetLauncherItemDelegate( |
| + const LauncherItem& item) OVERRIDE; |
| + |
| + private: |
| + 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.
|
| + scoped_ptr<AppListLauncherItemDelegate> app_list_launcher_item_delegate_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(LauncherDelegateProxy); |
| +}; |
| + |
| +} // namespace internal |
| +} // namespace ash |
| + |
| +#endif // ASH_LAUNCHER_LAUNCHER_DELEGATE_PROXY_H_ |