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

Side by Side Diff: ios/web/web_state/ui/crw_context_menu_provider.h

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: Add to gn 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 IOS_WEB_WEB_STATE_UI_CRW_CONTEXT_MENU_PROVIDER_H_ 4 #ifndef IOS_WEB_WEB_STATE_UI_CRW_CONTEXT_MENU_PROVIDER_H_
5 #define IOS_WEB_WEB_STATE_UI_CRW_CONTEXT_MENU_PROVIDER_H_ 5 #define IOS_WEB_WEB_STATE_UI_CRW_CONTEXT_MENU_PROVIDER_H_
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 @class CRUContextMenuHolder; 9 @class CRUContextMenuHolder;
10 @class ContextMenuHolder;
10 11
11 // A protocol implemented by a provider of labels and actions for a context 12 // A protocol implemented by a provider of labels and actions for a context
12 // menu. 13 // menu.
13 @protocol CRWContextMenuProvider<NSObject> 14 @protocol CRWContextMenuProvider<NSObject>
14 15
16 // Temporarily optional to allow move of ContextMenuHolder.
17 @optional
15 // Returns a CRUContextMenuHolder with the titles and actions associated with 18 // Returns a CRUContextMenuHolder with the titles and actions associated with
16 // each menu item. The "Cancel" item is automatically added when constructing 19 // each menu item. The "Cancel" item is automatically added when constructing
17 // the menu for presentation, therefore it should not be added to the list. 20 // the menu for presentation, therefore it should not be added to the list.
18 // Each CRWContextMenuProvider might have different requirements for the 21 // Each CRWContextMenuProvider might have different requirements for the
19 // |contextDictionary|. On a web page |kContextLinkURLString| and 22 // |contextDictionary|. On a web page |kContextLinkURLString| and
20 // |kContextImageURLString| might both be set whereas on a recently visited 23 // |kContextImageURLString| might both be set whereas on a recently visited
21 // entry some other identifier will be passed on. 24 // entry some other identifier will be passed on.
22 - (CRUContextMenuHolder*)contextMenuForDictionary:(NSDictionary*)context; 25 - (CRUContextMenuHolder*)contextMenuForDictionary:(NSDictionary*)context;
26 - (ContextMenuHolder*)contextMenuHolderForDictionary:(NSDictionary*)context;
23 27
24 @end 28 @end
25 29
26 namespace web { 30 namespace web {
27 31
28 // Keys for the contextDictionary. 32 // Keys for the contextDictionary.
29 33
30 // The menu title (as an NSString). 34 // The menu title (as an NSString).
31 extern NSString* const kContextTitle; 35 extern NSString* const kContextTitle;
32 // The url spec (as an NSString) of the the inner-most wrapping anchor tag to 36 // The url spec (as an NSString) of the the inner-most wrapping anchor tag to
33 // the current element. 37 // the current element.
34 extern NSString* const kContextLinkURLString; 38 extern NSString* const kContextLinkURLString;
35 // The referrer policy to use when opening the link. 39 // The referrer policy to use when opening the link.
36 extern NSString* const kContextLinkReferrerPolicy; 40 extern NSString* const kContextLinkReferrerPolicy;
37 // The url spec (as an NSString) for the image of the current element. 41 // The url spec (as an NSString) for the image of the current element.
38 extern NSString* const kContextImageURLString; 42 extern NSString* const kContextImageURLString;
39 43
40 } // namespace web 44 } // namespace web
41 45
42 #endif // IOS_WEB_WEB_STATE_UI_CRW_CONTEXT_MENU_PROVIDER_H_ 46 #endif // IOS_WEB_WEB_STATE_UI_CRW_CONTEXT_MENU_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698