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

Unified Diff: ash/common/shelf/shelf_item_delegate.h

Issue 2671923002: mash: Cleanup ash shelf application menu code. (Closed)
Patch Set: Add comments Created 3 years, 10 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 | « ash/common/shelf/shelf_controller.cc ('k') | ash/common/shelf/shelf_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_item_delegate.h
diff --git a/ash/common/shelf/shelf_item_delegate.h b/ash/common/shelf/shelf_item_delegate.h
index 424e0de8ca7e64de3ae3cbc585d826b8eff1107c..43605db24411b7426b6bafa0293ccc6141350283 100644
--- a/ash/common/shelf/shelf_item_delegate.h
+++ b/ash/common/shelf/shelf_item_delegate.h
@@ -6,11 +6,10 @@
#define ASH_COMMON_SHELF_SHELF_ITEM_DELEGATE_H_
#include "ash/ash_export.h"
-#include "base/strings/string16.h"
+#include "ash/public/cpp/shelf_application_menu_item.h"
namespace ui {
class Event;
-class SimpleMenuModel;
}
namespace ash {
@@ -43,16 +42,9 @@ class ASH_EXPORT ShelfItemDelegate {
// Returns the action performed by selecting the item.
virtual PerformedAction ItemSelected(const ui::Event& event) = 0;
- // Returns the application menu model for the specified item. There are three
- // possible return values:
- // - A return of NULL indicates that no menu is wanted for this item.
- // - A return of a menu with one item means that only the name of the
- // application/item was added and there are no active applications.
- // Note: This is useful for hover menus which also show context help.
- // - A list containing the title and the active list of items.
- // The caller takes ownership of the returned model.
+ // Returns any application menu items that should appear for this shelf item.
// |event_flags| specifies the flags of the event which triggered this menu.
- virtual ui::SimpleMenuModel* CreateApplicationMenu(int event_flags) = 0;
+ virtual ShelfAppMenuItemList GetAppMenuItems(int event_flags) = 0;
// Closes all windows associated with this item.
virtual void Close() = 0;
« no previous file with comments | « ash/common/shelf/shelf_controller.cc ('k') | ash/common/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698