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

Side by Side Diff: ios/chrome/browser/ui/context_menu/context_menu_holder.mm

Issue 1891863004: Copy contents of ui/base/ios into ios/chrome/browser/ui/context_menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix HardwardKeyboard test Created 4 years, 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #import "ui/base/ios/cru_context_menu_holder.h" 5 #import "ios/chrome/browser/ui/context_menu/context_menu_holder.h"
6 6
7 #import "base/logging.h" 7 #import "base/logging.h"
8 #import "base/mac/scoped_nsobject.h" 8 #import "base/mac/scoped_nsobject.h"
9 9
10 @implementation CRUContextMenuHolder { 10 @implementation ContextMenuHolder {
11 // Backs the property of the same name. 11 // Backs the property of the same name.
12 base::scoped_nsobject<NSString> _menuTitle; 12 base::scoped_nsobject<NSString> _menuTitle;
13 // Stores the itemTitles of the menu items. 13 // Stores the itemTitles of the menu items.
14 base::scoped_nsobject<NSMutableArray> _itemTitles; 14 base::scoped_nsobject<NSMutableArray> _itemTitles;
15 // Keep a copy of all the actions blocks. 15 // Keep a copy of all the actions blocks.
16 base::scoped_nsobject<NSMutableArray> _actions; 16 base::scoped_nsobject<NSMutableArray> _actions;
17 // A set of indices in |_actions| that should cause the context menu to be 17 // A set of indices in |_actions| that should cause the context menu to be
18 // dismissed without animation when tapped. 18 // dismissed without animation when tapped.
19 base::scoped_nsobject<NSMutableIndexSet> _dismissImmediatelyActions; 19 base::scoped_nsobject<NSMutableIndexSet> _dismissImmediatelyActions;
20 } 20 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 - (void)performActionAtIndex:(NSUInteger)index { 66 - (void)performActionAtIndex:(NSUInteger)index {
67 static_cast<ProceduralBlock>([_actions objectAtIndex:index])(); 67 static_cast<ProceduralBlock>([_actions objectAtIndex:index])();
68 } 68 }
69 69
70 - (BOOL)shouldDismissImmediatelyOnClickedAtIndex:(NSUInteger)index { 70 - (BOOL)shouldDismissImmediatelyOnClickedAtIndex:(NSUInteger)index {
71 return [_dismissImmediatelyActions containsIndex:index]; 71 return [_dismissImmediatelyActions containsIndex:index];
72 } 72 }
73 73
74 @end 74 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/context_menu/context_menu_holder.h ('k') | ios/chrome/browser/ui/context_menu/context_menu_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698