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

Side by Side Diff: ash/common/shelf/shelf_item_delegate.h

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
« no previous file with comments | « ash/common/shelf/shelf_controller.cc ('k') | ash/common/shelf/shelf_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef ASH_COMMON_SHELF_SHELF_ITEM_DELEGATE_H_ 5 #ifndef ASH_COMMON_SHELF_SHELF_ITEM_DELEGATE_H_
6 #define ASH_COMMON_SHELF_SHELF_ITEM_DELEGATE_H_ 6 #define ASH_COMMON_SHELF_SHELF_ITEM_DELEGATE_H_
7 7
8 #include <stdint.h>
9
8 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
9 #include "ash/public/cpp/shelf_application_menu_item.h" 11 #include "ash/public/cpp/shelf_application_menu_item.h"
10 #include "ash/public/cpp/shelf_types.h" 12 #include "ash/public/cpp/shelf_types.h"
11 #include "ui/events/event_constants.h" 13 #include "ui/events/event_constants.h"
12 14
13 namespace ash { 15 namespace ash {
14 16
15 // Delegate for the ShelfItem. 17 // Delegate for the ShelfItem.
16 class ASH_EXPORT ShelfItemDelegate { 18 class ASH_EXPORT ShelfItemDelegate {
17 public: 19 public:
(...skipping 10 matching lines...) Expand all
28 int64_t display_id, 30 int64_t display_id,
29 ShelfLaunchSource source) = 0; 31 ShelfLaunchSource source) = 0;
30 32
31 // A helper to call ItemSelected with a source and default arguments. 33 // A helper to call ItemSelected with a source and default arguments.
32 ShelfAction ItemSelectedBySource(ShelfLaunchSource source); 34 ShelfAction ItemSelectedBySource(ShelfLaunchSource source);
33 35
34 // Returns any application menu items that should appear for this shelf item. 36 // Returns any application menu items that should appear for this shelf item.
35 // |event_flags| specifies the flags of the event which triggered this menu. 37 // |event_flags| specifies the flags of the event which triggered this menu.
36 virtual ShelfAppMenuItemList GetAppMenuItems(int event_flags) = 0; 38 virtual ShelfAppMenuItemList GetAppMenuItems(int event_flags) = 0;
37 39
40 // Called on invocation of a shelf item's application menu command.
41 virtual void ExecuteCommand(uint32_t command_id, int event_flags) = 0;
42
38 // Closes all windows associated with this item. 43 // Closes all windows associated with this item.
39 virtual void Close() = 0; 44 virtual void Close() = 0;
40 45
41 DISALLOW_COPY_AND_ASSIGN(ShelfItemDelegate); 46 DISALLOW_COPY_AND_ASSIGN(ShelfItemDelegate);
42 }; 47 };
43 48
44 } // namespace ash 49 } // namespace ash
45 50
46 #endif // ASH_COMMON_SHELF_SHELF_ITEM_DELEGATE_H_ 51 #endif // ASH_COMMON_SHELF_SHELF_ITEM_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_controller.cc ('k') | ash/common/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698