OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_CONTEXT_IMPL_H_ |
| 6 #define IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_CONTEXT_IMPL_H_ |
| 7 |
| 8 #include "base/strings/string16.h" |
| 9 #import "ios/clean/chrome/browser/ui/context_menu/context_menu_context.h" |
| 10 |
| 11 namespace web { |
| 12 struct ContextMenuParams; |
| 13 } |
| 14 |
| 15 class GURL; |
| 16 |
| 17 // Context object used to populate the context menu UI and to handle commands |
| 18 // from that UI. |
| 19 @interface ContextMenuContextImpl : ContextMenuContext |
| 20 |
| 21 // ContextMenuContextImpls must be initialized with |params|. |
| 22 - (instancetype)initWithParams:(const web::ContextMenuParams&)params |
| 23 NS_DESIGNATED_INITIALIZER; |
| 24 - (instancetype)init NS_UNAVAILABLE; |
| 25 |
| 26 // The title to use for the menu. |
| 27 @property(nonatomic, readonly, strong) NSString* menuTitle; |
| 28 |
| 29 // If the context menu was triggered by long-pressing a link, |linkURL| will be |
| 30 // that link's URL. |
| 31 @property(nonatomic, readonly) const GURL& linkURL; |
| 32 |
| 33 // If the context menu was triggered by long-pressing an image, |imageURL| will |
| 34 // be the URL for that image. |
| 35 @property(nonatomic, readonly) const GURL& imageURL; |
| 36 |
| 37 // If the context menu was triggered by long-pressing a JavaScript link, |
| 38 // |script| will be the script for that link. |
| 39 @property(nonatomic, readonly) const base::string16& script; |
| 40 |
| 41 @end |
| 42 |
| 43 #endif // IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_CONTEXT_IMPL_H_ |
OLD | NEW |