| Index: trunk/src/ash/test/test_launcher_delegate.h
|
| ===================================================================
|
| --- trunk/src/ash/test/test_launcher_delegate.h (revision 226578)
|
| +++ trunk/src/ash/test/test_launcher_delegate.h (working copy)
|
| @@ -9,6 +9,7 @@
|
| #include <set>
|
|
|
| #include "ash/launcher/launcher_delegate.h"
|
| +#include "ash/launcher/launcher_item_delegate.h"
|
| #include "base/compiler_specific.h"
|
| #include "ui/aura/window_observer.h"
|
|
|
| @@ -21,6 +22,7 @@
|
| // Test implementation of LauncherDelegate.
|
| // Tests may create icons for windows by calling AddLauncherItem
|
| class TestLauncherDelegate : public LauncherDelegate,
|
| + public LauncherItemDelegate,
|
| public aura::WindowObserver {
|
| public:
|
| explicit TestLauncherDelegate(LauncherModel* model);
|
| @@ -48,12 +50,26 @@
|
| virtual bool IsAppPinned(const std::string& app_id) OVERRIDE;
|
| virtual void UnpinAppWithID(const std::string& app_id) OVERRIDE;
|
|
|
| + // LauncherItemDelegate implementation.
|
| + virtual void ItemSelected(const LauncherItem& item,
|
| + const ui::Event& event) OVERRIDE;
|
| + virtual base::string16 GetTitle(const LauncherItem& item) OVERRIDE;
|
| + virtual ui::MenuModel* CreateContextMenu(const LauncherItem& item,
|
| + aura::RootWindow* root) OVERRIDE;
|
| + virtual ash::LauncherMenuModel* CreateApplicationMenu(
|
| + const LauncherItem& item,
|
| + int event_flags) OVERRIDE;
|
| + virtual bool IsDraggable(const ash::LauncherItem& item) OVERRIDE;
|
| + virtual bool ShouldShowTooltip(const LauncherItem& item) OVERRIDE;
|
| +
|
| private:
|
| typedef std::map<aura::Window*, ash::LauncherID> WindowToID;
|
| typedef std::set<aura::Window*> ObservedWindows;
|
|
|
| static TestLauncherDelegate* instance_;
|
|
|
| + aura::Window* GetWindowByID(ash::LauncherID id);
|
| +
|
| LauncherModel* model_;
|
|
|
| // Maps from window to the id we gave it.
|
|
|