Chromium Code Reviews| 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..79de5853167b1d692e410d2c3c057bf06b1bfd2e |
| --- /dev/null |
| +++ b/ios/web_view/public/cwv_ui_delegate.h |
| @@ -0,0 +1,31 @@ |
| +// 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/CGGeometry.h> |
|
Eugene But (OOO till 7-30)
2017/02/27 16:34:06
<CoreGraphics/CoreGraphics.h>
https://google.gith
michaeldo
2017/02/27 19:02:06
Done.
|
| + |
| +@class CWVHTMLElement; |
| +@class CWVWebView; |
| +@class NSString; |
|
Eugene But (OOO till 7-30)
2017/02/27 16:34:06
Optional nit: How about importing UIKit instead of
michaeldo
2017/02/27 19:02:06
Done.
|
| +@class UIView; |
| + |
| +// 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_ |