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

Unified Diff: ash/shell/window_watcher_shelf_item_delegate.cc

Issue 2718563008: mash: Use mojo for ShelfItemDelegate and [app] MenuItem. (Closed)
Patch Set: Cleanup; fix ash_shell compile and a couple tests. Created 3 years, 9 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: ash/shell/window_watcher_shelf_item_delegate.cc
diff --git a/ash/shell/window_watcher_shelf_item_delegate.cc b/ash/shell/window_watcher_shelf_item_delegate.cc
index d7cd2424b13aa3adafd595a4e2f1cb63e39b0625..2002a6c8d01335ded9531e11d92961121e3b1967 100644
--- a/ash/shell/window_watcher_shelf_item_delegate.cc
+++ b/ash/shell/window_watcher_shelf_item_delegate.cc
@@ -21,27 +21,21 @@ WindowWatcherShelfItemDelegate::WindowWatcherShelfItemDelegate(
WindowWatcherShelfItemDelegate::~WindowWatcherShelfItemDelegate() {}
-ShelfAction WindowWatcherShelfItemDelegate::ItemSelected(
- ui::EventType event_type,
- int event_flags,
+void WindowWatcherShelfItemDelegate::ItemSelected(
+ std::unique_ptr<ui::Event> event,
int64_t display_id,
- ShelfLaunchSource source) {
+ ShelfLaunchSource source,
+ const ItemSelectedCallback& callback) {
aura::Window* window = watcher_->GetWindowByID(id_);
if (window->type() == ui::wm::WINDOW_TYPE_PANEL)
wm::MoveWindowToDisplay(window, display_id);
window->Show();
wm::ActivateWindow(window);
- return SHELF_ACTION_WINDOW_ACTIVATED;
-}
-
-ShelfAppMenuItemList WindowWatcherShelfItemDelegate::GetAppMenuItems(
- int event_flags) {
- // Return an empty item list to avoid showing an application menu.
- return ShelfAppMenuItemList();
+ callback.Run(SHELF_ACTION_WINDOW_ACTIVATED, MenuItemList());
}
void WindowWatcherShelfItemDelegate::ExecuteCommand(uint32_t command_id,
- int event_flags) {
+ int32_t event_flags) {
// This delegate does not support showing an application menu.
NOTIMPLEMENTED();
}

Powered by Google App Engine
This is Rietveld 408576698