Chromium Code Reviews| Index: ash/shelf/wm_shelf.cc |
| diff --git a/ash/shelf/wm_shelf.cc b/ash/shelf/wm_shelf.cc |
| index 57719054ccb4191d657e400ecd254f244f916ff9..6c6ea982ca534afaa3d7991c6259d83b09881263 100644 |
| --- a/ash/shelf/wm_shelf.cc |
| +++ b/ash/shelf/wm_shelf.cc |
| @@ -295,13 +295,18 @@ void WmShelf::LaunchShelfItem(int item_index) { |
| // static |
| void WmShelf::ActivateShelfItem(int item_index) { |
| + ActivateShelfItemInDisplay(item_index, display::kInvalidDisplayId); |
| +} |
| + |
| +// static |
| +void WmShelf::ActivateShelfItemInDisplay(int item_index, int64_t display_id) { |
|
Mr4D (OOO till 08-26)
2017/05/22 15:02:28
Maybe .. onDisplay which sounds much better here.
weidongg
2017/05/23 16:37:46
Done.
|
| ShelfModel* shelf_model = Shell::Get()->shelf_model(); |
| const ShelfItem& item = shelf_model->items()[item_index]; |
| ShelfItemDelegate* item_delegate = shelf_model->GetShelfItemDelegate(item.id); |
| std::unique_ptr<ui::Event> event = base::MakeUnique<ui::KeyEvent>( |
| ui::ET_KEY_RELEASED, ui::VKEY_UNKNOWN, ui::EF_NONE); |
| - item_delegate->ItemSelected(std::move(event), display::kInvalidDisplayId, |
| - LAUNCH_FROM_UNKNOWN, base::Bind(&NoopCallback)); |
| + item_delegate->ItemSelected(std::move(event), display_id, LAUNCH_FROM_UNKNOWN, |
| + base::Bind(&NoopCallback)); |
| } |
| bool WmShelf::ProcessGestureEvent(const ui::GestureEvent& event) { |