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

Unified Diff: ios/web/web_state/context_menu_params_utils.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
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/web_state/context_menu_params_utils.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/context_menu_params_utils.h
diff --git a/ios/web/web_state/context_menu_params_utils.h b/ios/web/web_state/context_menu_params_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..f3f2276222b2cb6c3496063ad8d76da772879a42
--- /dev/null
+++ b/ios/web/web_state/context_menu_params_utils.h
@@ -0,0 +1,22 @@
+// 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_WEB_WEB_STATE_CONTEXT_MENU_PARAMS_UTILS_H_
+#define IOS_WEB_WEB_STATE_CONTEXT_MENU_PARAMS_UTILS_H_
+
+#import <UIKit/UIKit.h>
+
+#import "ios/web/public/web_state/context_menu_params.h"
+
+namespace web {
+// 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 ContextMenuParamsFromElementDictionary(NSDictionary* element);
+} // namespace web
+
+#endif // IOS_WEB_WEB_STATE_CONTEXT_MENU_PARAMS_UTILS_H_
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/web_state/context_menu_params_utils.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698