Infobar material design refresh: bg color
[chromium-blink-merge.git] / ios / web / web_state / ui / crw_context_menu_provider.h
blob793cf32ec3afc0f7626c0810d2daafc785778048
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
3 // found in the LICENSE file.
4 #ifndef IOS_WEB_WEB_STATE_UI_CRW_CONTEXT_MENU_PROVIDER_H_
5 #define IOS_WEB_WEB_STATE_UI_CRW_CONTEXT_MENU_PROVIDER_H_
7 #import <Foundation/Foundation.h>
9 @class CRUContextMenuHolder;
11 // A protocol implemented by a provider of labels and actions for a context
12 // menu.
13 @protocol CRWContextMenuProvider
15 // Returns a CRUContextMenuHolder with the titles and actions associated with
16 // 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.
18 // Each CRWContextMenuProvider might have different requirements for the
19 // |contextDictionary|. On a web page |kContextLinkURLString| and
20 // |kContextImageURLString| might both be set whereas on a recently visited
21 // entry some other identifier will be passed on.
22 - (CRUContextMenuHolder*)contextMenuForDictionary:(NSDictionary*)context;
24 @end
26 namespace web {
28 // Keys for the contextDictionary.
30 // The menu title (as an NSString).
31 extern NSString* const kContextTitle;
32 // The url spec (as an NSString) of the the inner-most wrapping anchor tag to
33 // the current element.
34 extern NSString* const kContextLinkURLString;
35 // The referrer policy to use when opening the link.
36 extern NSString* const kContextLinkReferrerPolicy;
37 // The url spec (as an NSString) for the image of the current element.
38 extern NSString* const kContextImageURLString;
40 } // namespace web
42 #endif // IOS_WEB_WEB_STATE_UI_CRW_CONTEXT_MENU_PROVIDER_H_