| Index: ios/clean/chrome/browser/ui/context_menu/context_menu_item.mm
|
| diff --git a/ios/clean/chrome/browser/ui/context_menu/context_menu_item.mm b/ios/clean/chrome/browser/ui/context_menu/context_menu_item.mm
|
| index 7af094159c5970b1fb9637519dabe113c4e27dfe..0a15afae17e5f090b85478dcc493e276091503e3 100644
|
| --- a/ios/clean/chrome/browser/ui/context_menu/context_menu_item.mm
|
| +++ b/ios/clean/chrome/browser/ui/context_menu/context_menu_item.mm
|
| @@ -8,41 +8,40 @@
|
| #error "This file requires ARC support."
|
| #endif
|
|
|
| -@interface ContextMenuItem () {
|
| - // Backing object for |commands|.
|
| - std::vector<SEL> _commands;
|
| -}
|
| +@interface ContextMenuItem ()
|
|
|
| // Convenience initializer for use by the factory method.
|
| - (instancetype)initWithTitle:(NSString*)title
|
| - commands:(const std::vector<SEL>&)commands;
|
| + command:(SEL)command
|
| + commandOpensTab:(BOOL)commandOpensTab NS_DESIGNATED_INITIALIZER;
|
|
|
| @end
|
|
|
| @implementation ContextMenuItem
|
|
|
| @synthesize title = _title;
|
| +@synthesize command = _command;
|
| +@synthesize commandOpensTab = _commandOpensTab;
|
|
|
| - (instancetype)initWithTitle:(NSString*)title
|
| - commands:(const std::vector<SEL>&)commands {
|
| + command:(SEL)command
|
| + commandOpensTab:(BOOL)commandOpensTab {
|
| if ((self = [super init])) {
|
| _title = [title copy];
|
| - _commands = commands;
|
| + _command = command;
|
| + _commandOpensTab = commandOpensTab;
|
| }
|
| return self;
|
| }
|
|
|
| -#pragma mark - Accessors
|
| -
|
| -- (const std::vector<SEL>&)commands {
|
| - return _commands;
|
| -}
|
| -
|
| #pragma mark - Public
|
|
|
| + (instancetype)itemWithTitle:(NSString*)title
|
| - commands:(const std::vector<SEL>&)commands {
|
| - return [[ContextMenuItem alloc] initWithTitle:title commands:commands];
|
| + command:(SEL)command
|
| + commandOpensTab:(BOOL)commandOpensTab {
|
| + return [[ContextMenuItem alloc] initWithTitle:title
|
| + command:command
|
| + commandOpensTab:commandOpensTab];
|
| }
|
|
|
| @end
|
|
|