| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/shelf/app_list_shelf_item_delegate.h" | 5 #include "ash/shelf/app_list_shelf_item_delegate.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/shelf/shelf_model.h" | 9 #include "ash/public/cpp/shelf_model.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 11 | 11 |
| 12 namespace ash { | 12 namespace ash { |
| 13 | 13 |
| 14 AppListShelfItemDelegate::AppListShelfItemDelegate() | 14 AppListShelfItemDelegate::AppListShelfItemDelegate() |
| 15 : ShelfItemDelegate(ShelfID(kAppListId)) {} | 15 : ShelfItemDelegate(ShelfID(kAppListId)) {} |
| 16 | 16 |
| 17 AppListShelfItemDelegate::~AppListShelfItemDelegate() {} | 17 AppListShelfItemDelegate::~AppListShelfItemDelegate() {} |
| 18 | 18 |
| 19 void AppListShelfItemDelegate::ItemSelected(std::unique_ptr<ui::Event> event, | 19 void AppListShelfItemDelegate::ItemSelected(std::unique_ptr<ui::Event> event, |
| 20 int64_t display_id, | 20 int64_t display_id, |
| 21 ShelfLaunchSource source, | 21 ShelfLaunchSource source, |
| 22 ItemSelectedCallback callback) { | 22 ItemSelectedCallback callback) { |
| 23 Shell::Get()->ToggleAppList(); | 23 Shell::Get()->ToggleAppList(); |
| 24 std::move(callback).Run(SHELF_ACTION_APP_LIST_SHOWN, base::nullopt); | 24 std::move(callback).Run(SHELF_ACTION_APP_LIST_SHOWN, base::nullopt); |
| 25 } | 25 } |
| 26 | 26 |
| 27 void AppListShelfItemDelegate::ExecuteCommand(uint32_t command_id, | 27 void AppListShelfItemDelegate::ExecuteCommand(uint32_t command_id, |
| 28 int32_t event_flags) { | 28 int32_t event_flags) { |
| 29 // This delegate does not support showing an application menu. | 29 // This delegate does not support showing an application menu. |
| 30 NOTIMPLEMENTED(); | 30 NOTIMPLEMENTED(); |
| 31 } | 31 } |
| 32 | 32 |
| 33 void AppListShelfItemDelegate::Close() {} | 33 void AppListShelfItemDelegate::Close() {} |
| 34 | 34 |
| 35 } // namespace ash | 35 } // namespace ash |
| OLD | NEW |