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

Side by Side Diff: ui/base/ios/cru_context_menu_controller.h

Issue 1103743002: Use UIAlertController on iOS8 for Context Menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set visible to YES right after presenting alert controller. Created 5 years, 7 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 | « no previous file | ui/base/ios/cru_context_menu_controller.mm » ('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 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 #ifndef UI_BASE_IOS_CRU_CONTEXT_MENU_CONTROLLER_H_ 4 #ifndef UI_BASE_IOS_CRU_CONTEXT_MENU_CONTROLLER_H_
5 #define UI_BASE_IOS_CRU_CONTEXT_MENU_CONTROLLER_H_ 5 #define UI_BASE_IOS_CRU_CONTEXT_MENU_CONTROLLER_H_
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 @class CRUContextMenuHolder; 9 @class CRUContextMenuHolder;
10 10
11 // Abstracts displaying context menus for all device form factors, given a 11 // Abstracts displaying context menus for all device form factors, given a
12 // CRUContextMenuHolder with the title and action to associate to each menu 12 // CRUContextMenuHolder with the title and action to associate to each menu
13 // item. Will show a sheet on the phone and use a popover on a tablet. 13 // item. Will show a sheet on the phone and use a popover on a tablet.
14 @interface CRUContextMenuController : NSObject<UIActionSheetDelegate, 14 @interface CRUContextMenuController : NSObject
15 UIPopoverControllerDelegate> 15
16 // Whether the context menu is visible.
17 @property(nonatomic, readonly, getter=isVisible) BOOL visible;
18
16 // Displays a context menu. If on a tablet, |localPoint| is the point in 19 // Displays a context menu. If on a tablet, |localPoint| is the point in
17 // |view|'s coordinates to show the popup. If a phone, |localPoint| is unused 20 // |view|'s coordinates to show the popup. If a phone, |localPoint| is unused
18 // since the display is a sheet, but |view| is still used to attach the sheet to 21 // since the display is a sheet, but |view| is still used to attach the sheet to
19 // the given view. 22 // the given view.
20 // The |menuHolder| that will be put in the menu. 23 // The |menuHolder| that will be put in the menu.
21 - (void)showWithHolder:(CRUContextMenuHolder*)menuHolder 24 - (void)showWithHolder:(CRUContextMenuHolder*)menuHolder
22 atPoint:(CGPoint)localPoint 25 atPoint:(CGPoint)localPoint
23 inView:(UIView*)view; 26 inView:(UIView*)view;
24 27
25 // Returns whether the context menu is visible.
26 - (BOOL)isVisible;
27
28 @end
29
30 @interface CRUContextMenuController (UsedForTesting)
31 @property (readonly) UIActionSheet* sheet;
32 @end 28 @end
33 29
34 #endif // UI_BASE_IOS_CRU_CONTEXT_MENU_CONTROLLER_H_ 30 #endif // UI_BASE_IOS_CRU_CONTEXT_MENU_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/ios/cru_context_menu_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698