OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_ITEM_H_ |
| 6 #define IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_ITEM_H_ |
| 7 |
| 8 #import <Foundation/Foundation.h> |
| 9 #include <vector> |
| 10 |
| 11 // Object encapsulating configuration information for an item in a context menu. |
| 12 @interface ContextMenuItem : NSObject |
| 13 |
| 14 // Create a new item with |title| and |commands|. |
| 15 + (instancetype)itemWithTitle:(NSString*)title |
| 16 commands:(const std::vector<SEL>&)commands; |
| 17 |
| 18 // The title associated with the item. This is usually the text the user will |
| 19 // see. |
| 20 @property(nonatomic, readonly, copy) NSString* title; |
| 21 |
| 22 // The ContextMenuCommands to be dispatched with menu's ContextMenuContext. |
| 23 // They will be dispatched in the order in which they appear in the vector. |
| 24 @property(nonatomic, readonly, assign) const std::vector<SEL>& commands; |
| 25 |
| 26 @end |
| 27 |
| 28 #endif // IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_ITEM_H_ |
OLD | NEW |