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

Unified Diff: ios/web_view/public/cwv_ui_delegate.h

Issue 2723433004: Add CWVUIDelegate with method to customize context menu. (Closed)
Patch Set: Respond to comment. Created 3 years, 10 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_view/public/cwv_html_element.h ('k') | ios/web_view/public/cwv_web_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web_view/public/cwv_ui_delegate.h
diff --git a/ios/web_view/public/cwv_ui_delegate.h b/ios/web_view/public/cwv_ui_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..6aa3cffd206c7f9aea652f16fe0e6d6e8e25a179
--- /dev/null
+++ b/ios/web_view/public/cwv_ui_delegate.h
@@ -0,0 +1,30 @@
+// 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_VIEW_PUBLIC_CWV_UI_DELEGATE_H_
+#define IOS_WEB_VIEW_PUBLIC_CWV_UI_DELEGATE_H_
+
+#import <CoreGraphics/CoreGraphics.h>
+#import <UIKit/UIKit.h>
+
+@class CWVHTMLElement;
+@class CWVWebView;
+
+// UI delegate interface for a CWVWebView. Embedders can implement the
+// functions in order to customize library behavior.
+@protocol CWVUIDelegate<NSObject>
+
+@optional
+// Instructs the delegate to present context menu in response to user’s long
+// press gesture at |location| in |view| coordinate space. |element| is an HTML
+// element which received the gesture.
+- (void)webView:(CWVWebView*)webView
+ runContextMenuWithTitle:(NSString*)menuTitle
+ forHTMLElement:(CWVHTMLElement*)element
+ inView:(UIView*)view
+ userGestureLocation:(CGPoint)location;
+
+@end
+
+#endif // IOS_WEB_VIEW_PUBLIC_CWV_UI_DELEGATE_H_
« no previous file with comments | « ios/web_view/public/cwv_html_element.h ('k') | ios/web_view/public/cwv_web_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698