| 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/common/shelf/app_list_shelf_item_delegate.h" | 5 #include "ash/common/shelf/app_list_shelf_item_delegate.h" |
| 6 | 6 |
| 7 #include "ash/common/shelf/shelf_model.h" | 7 #include "ash/common/shelf/shelf_model.h" |
| 8 #include "ash/common/strings/grit/ash_strings.h" | 8 #include "ash/common/strings/grit/ash_strings.h" |
| 9 #include "ash/common/wm_shell.h" | 9 #include "ash/common/wm_shell.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 ShelfAction AppListShelfItemDelegate::ItemSelected(ui::EventType event_type, | 35 ShelfAction AppListShelfItemDelegate::ItemSelected(ui::EventType event_type, |
| 36 int event_flags, | 36 int event_flags, |
| 37 int64_t display_id, | 37 int64_t display_id, |
| 38 ShelfLaunchSource source) { | 38 ShelfLaunchSource source) { |
| 39 WmShell::Get()->ToggleAppList(); | 39 WmShell::Get()->ToggleAppList(); |
| 40 return SHELF_ACTION_APP_LIST_SHOWN; | 40 return SHELF_ACTION_APP_LIST_SHOWN; |
| 41 } | 41 } |
| 42 | 42 |
| 43 ShelfAppMenuItemList AppListShelfItemDelegate::GetAppMenuItems( | 43 ShelfAppMenuItemList AppListShelfItemDelegate::GetAppMenuItems( |
| 44 int event_flags) { | 44 int event_flags) { |
| 45 // AppList does not show an application menu. | 45 // Return an empty item list to avoid showing an application menu. |
| 46 return ShelfAppMenuItemList(); | 46 return ShelfAppMenuItemList(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void AppListShelfItemDelegate::ExecuteCommand(uint32_t command_id, |
| 50 int event_flags) { |
| 51 // This delegate does not support showing an application menu. |
| 52 NOTIMPLEMENTED(); |
| 53 } |
| 54 |
| 49 void AppListShelfItemDelegate::Close() {} | 55 void AppListShelfItemDelegate::Close() {} |
| 50 | 56 |
| 51 } // namespace ash | 57 } // namespace ash |
| OLD | NEW |