| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 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 | |
| 5 #ifndef IOS_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_PROVIDER_H_ | |
| 6 #define IOS_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_PROVIDER_H_ | |
| 7 | |
| 8 // A protocol implemented by a provider of labels and actions for a context | |
| 9 // menu. | |
| 10 @protocol ContextMenuProvider<NSObject> | |
| 11 | |
| 12 // Returns a ContextMenuHolder with the titles and actions associated with | |
| 13 // each menu item. The "Cancel" item is automatically added when constructing | |
| 14 // the menu for presentation, therefore it should not be added to the list. | |
| 15 // Each ContextMenuProvider might have different requirements for the | |
| 16 // |contextDictionary|. On a web page |kContextLinkURLString| and | |
| 17 // |kContextImageURLString| might both be set whereas on a recently visited | |
| 18 // entry some other identifier will be passed on. | |
| 19 - (ContextMenuHolder*)contextMenuForDictionary:(NSDictionary*)context; | |
| 20 | |
| 21 @end | |
| 22 | |
| 23 #endif // IOS_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_PROVIDER_H_ | |
| OLD | NEW |