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

Unified Diff: ios/web/public/web_state/context_menu_params.h

Issue 2640433002: Clean the new CRWContextMenuController (Closed)
Patch Set: feedback Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ios/web/public/web_state/context_menu_params.h
diff --git a/ios/web/public/web_state/context_menu_params.h b/ios/web/public/web_state/context_menu_params.h
index 925fa30032caf5e38d19d3314f3d04ad6abc152b..4a1f61a2e7997f0f48b25ec1bc3a0e0c05395808 100644
--- a/ios/web/public/web_state/context_menu_params.h
+++ b/ios/web/public/web_state/context_menu_params.h
@@ -20,6 +20,15 @@ struct ContextMenuParams {
ContextMenuParams(const ContextMenuParams& other);
~ContextMenuParams();
+ // Convenience constructor that creates a ContextMenuParams from a
+ // NSDictionary representing an HTML element.
+ // The fields "href", "src", "title", "referrerPolicy" and "innerText" will
+ // be used (if present) to generate the ContextMenuParams.
+ // All these fields must be NSString*.
+ // This constructor does not set fields relative to the touch event (view and
+ // location).
+ ContextMenuParams(NSDictionary* element);
Eugene But (OOO till 7-30) 2017/01/17 18:12:48 This method is specific to ios/web implementation
Olivier 2017/01/18 08:55:54 I hesitated :) Done.
+
// The title of the menu.
base::scoped_nsobject<NSString> menu_title;

Powered by Google App Engine
This is Rietveld 408576698