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

Side by Side Diff: ash/common/shelf/app_list_shelf_item_delegate.cc

Issue 2716403005: mash: Remove shelf app menu item objects. (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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ash/common/shelf/app_list_shelf_item_delegate.h ('k') | ash/common/shelf/shelf_application_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698