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

Unified Diff: ash/common/test/test_shelf_item_delegate.cc

Issue 2718563008: mash: Use mojo for ShelfItemDelegate and [app] MenuItem. (Closed)
Patch Set: Address comments. 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/common/test/test_shelf_item_delegate.cc
diff --git a/ash/common/test/test_shelf_item_delegate.cc b/ash/common/test/test_shelf_item_delegate.cc
index 31e22c866ef00612b187d31703babed8c91fca5a..8bcd6d0f461fc378d1fd26e65a995ad591356549 100644
--- a/ash/common/test/test_shelf_item_delegate.cc
+++ b/ash/common/test/test_shelf_item_delegate.cc
@@ -15,27 +15,24 @@ TestShelfItemDelegate::TestShelfItemDelegate(WmWindow* window)
TestShelfItemDelegate::~TestShelfItemDelegate() {}
-ShelfAction TestShelfItemDelegate::ItemSelected(ui::EventType event_type,
- int event_flags,
- int64_t display_id,
- ShelfLaunchSource source) {
+void TestShelfItemDelegate::ItemSelected(std::unique_ptr<ui::Event> event,
+ int64_t display_id,
+ ShelfLaunchSource source,
+ const ItemSelectedCallback& callback) {
if (window_) {
if (window_->GetType() == ui::wm::WINDOW_TYPE_PANEL)
wm::MoveWindowToDisplay(window_->aura_window(), display_id);
window_->Show();
window_->Activate();
- return SHELF_ACTION_WINDOW_ACTIVATED;
+ callback.Run(SHELF_ACTION_WINDOW_ACTIVATED,
+ std::vector<mojom::MenuItemPtr>());
+ return;
}
- return SHELF_ACTION_NONE;
-}
-
-ShelfAppMenuItemList TestShelfItemDelegate::GetAppMenuItems(int event_flags) {
- // Return an empty item list to avoid showing an application menu.
- return ShelfAppMenuItemList();
+ callback.Run(SHELF_ACTION_NONE, std::vector<mojom::MenuItemPtr>());
}
void TestShelfItemDelegate::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