Index: ios/clean/chrome/browser/ui/context_menu/context_menu_context_impl.h |
diff --git a/ios/clean/chrome/browser/ui/context_menu/context_menu_context_impl.h b/ios/clean/chrome/browser/ui/context_menu/context_menu_context_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d1a6ddab1a8dec0fa27737a5cb5d38c27ff18a3f |
--- /dev/null |
+++ b/ios/clean/chrome/browser/ui/context_menu/context_menu_context_impl.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_CONTEXT_IMPL_H_ |
+#define IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_CONTEXT_IMPL_H_ |
+ |
+#include "base/strings/string16.h" |
+#import "ios/clean/chrome/browser/ui/context_menu/context_menu_context.h" |
+ |
+namespace web { |
+struct ContextMenuParams; |
+} |
+ |
+class GURL; |
+ |
+// Context object used to populate the context menu UI and to handle commands |
+// from that UI. |
+@interface ContextMenuContextImpl : ContextMenuContext |
edchin
2017/05/25 21:41:53
The pseudo abstract base class and "Impl" seem mor
kkhorimoto
2017/05/26 23:20:09
Acknowledged.
|
+ |
+// ContextMenuContextImpls must be initialized with |params|. |
+- (instancetype)initWithParams:(const web::ContextMenuParams&)params |
+ NS_DESIGNATED_INITIALIZER; |
+- (instancetype)init NS_UNAVAILABLE; |
+ |
+// The title to use for the menu. |
+@property(nonatomic, readonly) NSString* menuTitle; |
edchin
2017/05/25 21:41:53
Are memory attributes not necessary here?
kkhorimoto
2017/05/26 23:20:09
The memory is manually managed (just passing throu
edchin
2017/05/27 15:59:03
You're right, it's readonly and you override the a
|
+ |
+// If the context menu was triggered by long-pressing a link, |linkURL| will be |
+// that link's URL. |
+@property(nonatomic, readonly) const GURL& linkURL; |
+ |
+// If the context menu was triggered by long-pressing an image, |imageURL| will |
+// be the URL for that image. |
+@property(nonatomic, readonly) const GURL& imageURL; |
+ |
+// If the context menu was triggered by long-pressing a JavaScript link, |
+// |script| will be the script for that link. |
+@property(nonatomic, readonly) const base::string16& script; |
+ |
+@end |
+ |
+#endif // IOS_CLEAN_CHROME_BROWSER_UI_CONTEXT_MENU_CONTEXT_MENU_CONTEXT_IMPL_H_ |