Index: ash/shelf/shelf_view_unittest.cc |
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc |
index a4d70724921a53e4bbb862d24affbbe9e6b856d3..e682c0d1efb222551dfb489fddfbd92482ca5fc6 100644 |
--- a/ash/shelf/shelf_view_unittest.cc |
+++ b/ash/shelf/shelf_view_unittest.cc |
@@ -155,18 +155,18 @@ class ShelfItemSelectionTracker : public TestShelfItemDelegate { |
bool WasSelected() { return selected_; } |
// TestShelfItemDelegate: |
- ShelfAction ItemSelected(ui::EventType event_type, |
- int event_flags, |
- int64_t display_id, |
- ShelfLaunchSource source) override { |
+ void ItemSelected(std::unique_ptr<ui::Event> event, |
+ int64_t display_id, |
+ ShelfLaunchSource source, |
+ const ItemSelectedCallback& callback) override { |
selected_ = true; |
- return item_selected_action_; |
+ callback.Run(item_selected_action_, MenuItemList()); |
} |
private: |
bool selected_; |
- // The action returned from ItemSelected(const ui::Event&). |
+ // The action reported by ItemSelected. |
ShelfAction item_selected_action_; |
DISALLOW_COPY_AND_ASSIGN(ShelfItemSelectionTracker); |
@@ -1979,12 +1979,14 @@ class ListMenuShelfItemDelegate : public TestShelfItemDelegate { |
private: |
// TestShelfItemDelegate: |
- ShelfAppMenuItemList GetAppMenuItems(int event_flags) override { |
- ShelfAppMenuItemList items; |
- base::string16 title = base::ASCIIToUTF16("title"); |
- items.push_back(base::MakeUnique<ShelfApplicationMenuItem>(0, title)); |
- items.push_back(base::MakeUnique<ShelfApplicationMenuItem>(1, title)); |
- return items; |
+ void ItemSelected(std::unique_ptr<ui::Event> event, |
+ int64_t display_id, |
+ ShelfLaunchSource source, |
+ const ItemSelectedCallback& callback) override { |
+ MenuItemList items; |
+ items.push_back(ash::mojom::MenuItem::New()); |
James Cook
2017/03/09 01:09:47
These don't need dummy data?
msw
2017/03/10 06:17:57
Nope! The test only cares that a menu shows; empty
|
+ items.push_back(ash::mojom::MenuItem::New()); |
+ callback.Run(ash::SHELF_ACTION_NONE, std::move(items)); |
} |
DISALLOW_COPY_AND_ASSIGN(ListMenuShelfItemDelegate); |
@@ -2426,9 +2428,8 @@ TEST_F(ShelfViewInkDropTest, ShelfButtonWithMenuPressRelease) { |
// Set a delegate for the shelf item that returns an app list menu. |
ShelfID browser_shelf_id = model_->items()[browser_index_].id; |
- ListMenuShelfItemDelegate* list_menu_delegate = new ListMenuShelfItemDelegate; |
model_->SetShelfItemDelegate(browser_shelf_id, |
- base::WrapUnique(list_menu_delegate)); |
+ base::MakeUnique<ListMenuShelfItemDelegate>()); |
views::CustomButton* button = browser_button_; |
gfx::Point mouse_location = button->GetLocalBounds().CenterPoint(); |