Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1434)

Unified Diff: trunk/src/ash/test/test_launcher_delegate.h

Issue 25716004: Revert 226547 "Refactor LauncherItemController and LauncherItemD..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
« no previous file with comments | « trunk/src/ash/test/launcher_item_delegate_manager_test_api.cc ('k') | trunk/src/ash/test/test_launcher_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698