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

Unified Diff: ios/web/public/web_view_creation_util.h

Issue 2627093003: Reuse context menu in StaticHTMLViewController (Closed)
Patch Set: cleaning 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_view_creation_util.h
diff --git a/ios/web/public/web_view_creation_util.h b/ios/web/public/web_view_creation_util.h
index 9b27d8b8f828bfe79849fb2c70dbf0de9df3d125..dcaea39fa8d37d181c5b07f4912ab20c47916ab5 100644
--- a/ios/web/public/web_view_creation_util.h
+++ b/ios/web/public/web_view_creation_util.h
@@ -8,6 +8,7 @@
#import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h>
+@protocol CRWContextMenuDelegate;
@class WKWebView;
namespace web {
@@ -23,6 +24,17 @@ class BrowserState;
//
WKWebView* BuildWKWebView(CGRect frame, BrowserState* browser_state);
+// Returns a new WKWebView for displaying regular web content.
+// The returned WKWebView is equivalent to the one created by |BuildWKWebView|
+// but a context menu recognizer is attached to it.
+// On a long press, context_menu_delegate webView:handleContextMenu:| is called.
+// Calling |BuildWKWebViewWithCustomContextMenu| with a |context_menu_delegate|
+// nil is equivalent to |BuildWKWebView|.
Eugene But (OOO till 7-30) 2017/01/13 16:19:41 Attaching content menu recognized has an actual pe
Olivier 2017/01/13 18:08:58 Done.
+WKWebView* BuildWKWebViewWithCustomContextMenu(
+ CGRect frame,
+ BrowserState* browser_state,
+ id<CRWContextMenuDelegate> context_menu_delegate);
+
} // web
#endif // IOS_WEB_PUBLIC_WEB_VIEW_CREATION_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698