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

Unified Diff: trunk/src/ash/launcher/launcher_item_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
« no previous file with comments | « trunk/src/ash/launcher/launcher_delegate.h ('k') | trunk/src/ash/launcher/launcher_item_delegate_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ash/launcher/launcher_item_delegate.h
===================================================================
--- trunk/src/ash/launcher/launcher_item_delegate.h (revision 226578)
+++ trunk/src/ash/launcher/launcher_item_delegate.h (working copy)
@@ -35,6 +35,7 @@
};
// Delegate for the LauncherItem.
+// TODO(simon.hong81): Remove LauncherItem from abstract function parameters.
class ASH_EXPORT LauncherItemDelegate {
public:
virtual ~LauncherItemDelegate() {}
@@ -45,15 +46,17 @@
// but not |aura::Window|. If the |event| is of type KeyEvent, it is assumed
// that this was triggered by keyboard action (Alt+<number>) and special
// handling might happen.
- virtual void ItemSelected(const ui::Event& event) = 0;
+ virtual void ItemSelected(const LauncherItem& item,
+ const ui::Event& event) = 0;
- // Returns the title to display.
- virtual base::string16 GetTitle() = 0;
+ // Returns the title to display for the specified launcher item.
+ virtual base::string16 GetTitle(const LauncherItem& item) = 0;
// Returns the context menumodel for the specified item on
// |root_window|. Return NULL if there should be no context
// menu. The caller takes ownership of the returned model.
- virtual ui::MenuModel* CreateContextMenu(aura::RootWindow* root_window) = 0;
+ virtual ui::MenuModel* CreateContextMenu(const LauncherItem& item,
+ aura::RootWindow* root_window) = 0;
// Returns the application menu model for the specified item. There are three
// possible return values:
@@ -64,13 +67,15 @@
// - A list containing the title and the active list of items.
// The caller takes ownership of the returned model.
// |event_flags| specifies the flags of the event which triggered this menu.
- virtual ash::LauncherMenuModel* CreateApplicationMenu(int event_flags) = 0;
+ virtual LauncherMenuModel* CreateApplicationMenu(
+ const LauncherItem& item,
+ int event_flags) = 0;
- // Whether the launcher item is draggable.
- virtual bool IsDraggable() = 0;
+ // Whether the given launcher item is draggable.
+ virtual bool IsDraggable(const LauncherItem& item) = 0;
- // Returns true if a tooltip should be shown.
- virtual bool ShouldShowTooltip() = 0;
+ // Returns true if a tooltip should be shown for the item.
+ virtual bool ShouldShowTooltip(const LauncherItem& item) = 0;
};
} // namespace ash
« no previous file with comments | « trunk/src/ash/launcher/launcher_delegate.h ('k') | trunk/src/ash/launcher/launcher_item_delegate_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698