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 |