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

Unified Diff: ash/common/shelf/shelf_view.cc

Issue 2716403005: mash: Remove shelf app menu item objects. (Closed)
Patch Set: Address 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_item_delegate.h ('k') | ash/common/shelf/shelf_window_watcher_item_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_view.cc
diff --git a/ash/common/shelf/shelf_view.cc b/ash/common/shelf/shelf_view.cc
index 65c6941072d06dfbf69652b98d8070a1ac9aafbb..8506aff04bf4debb7e74ecb4cb5ab1817144e4a3 100644
--- a/ash/common/shelf/shelf_view.cc
+++ b/ash/common/shelf/shelf_view.cc
@@ -1617,19 +1617,18 @@ bool ShelfView::ShowListMenuForView(const ShelfItem& item,
const ui::Event& event,
views::InkDrop* ink_drop) {
ShelfItemDelegate* item_delegate = model_->GetShelfItemDelegate(item.id);
- ShelfAppMenuItemList menu_items =
- item_delegate->GetAppMenuItems(event.flags());
+ ShelfAppMenuItemList items = item_delegate->GetAppMenuItems(event.flags());
// The application list menu should only show for two or more items; return
// false here to ensure that other behavior is triggered (eg. activating or
// minimizing a single associated window, or launching a pinned shelf item).
- if (menu_items.size() < 2)
+ if (items.size() < 2)
return false;
ink_drop->AnimateToState(views::InkDropState::ACTIVATED);
context_menu_id_ = item.id;
- ShowMenu(base::MakeUnique<ShelfApplicationMenuModel>(item.title,
- std::move(menu_items)),
+ ShowMenu(base::MakeUnique<ShelfApplicationMenuModel>(
+ item.title, std::move(items), item_delegate),
source, gfx::Point(), false, ui::GetMenuSourceTypeForEvent(event),
ink_drop);
return true;
« no previous file with comments | « ash/common/shelf/shelf_item_delegate.h ('k') | ash/common/shelf/shelf_window_watcher_item_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698