Chromium Code Reviews| Index: ios/web/web_state/ui/crw_context_menu_controller.h |
| diff --git a/ios/web/web_state/ui/crw_context_menu_controller.h b/ios/web/web_state/ui/crw_context_menu_controller.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f359841183b2641e4c8273384c6a06565523a647 |
| --- /dev/null |
| +++ b/ios/web/web_state/ui/crw_context_menu_controller.h |
| @@ -0,0 +1,32 @@ |
| +// 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_UI_CRW_CONTEXT_MENU_CONTROLLER_H_ |
| +#define IOS_WEB_WEB_STATE_UI_CRW_CONTEXT_MENU_CONTROLLER_H_ |
| + |
| +#import <UIKit/UIKit.h> |
|
Eugene But (OOO till 7-30)
2017/01/13 16:19:41
nit: there is nothing from UIKit in this header, i
Olivier
2017/01/13 18:08:58
I thought WKWebView needed it.
Done.
|
| +#import <Webkit/Webkit.h> |
| + |
| +#import "ios/web/public/block_types.h" |
| + |
| +@protocol CRWContextMenuDelegate; |
| + |
| +@protocol CRWContextMenuJavaScriptDelegate |
| +- (void)executeJavaScript:(NSString*)script |
| + completionHandler:(web::JavaScriptResultBlock)completionHandler; |
| +@end |
| + |
| +@interface CRWContextMenuController : NSObject |
|
Eugene But (OOO till 7-30)
2017/01/13 16:19:41
Per Style Guide please add comments to this class
Olivier
2017/01/13 18:08:58
Done.
|
| + |
| +- (instancetype)initWithWebView:(WKWebView*)webView |
| + javaScriptDelegate: |
| + (id<CRWContextMenuJavaScriptDelegate>)javaScriptDelegate |
|
Eugene But (OOO till 7-30)
2017/01/13 16:19:41
You can use CRWJSInjectionEvaluator protocol here,
Olivier
2017/01/13 18:08:58
Done.
|
| + delegate:(id<CRWContextMenuDelegate>)delegate |
| + NS_DESIGNATED_INITIALIZER; |
| + |
| +- (instancetype)init NS_UNAVAILABLE; |
| + |
| +@end |
| + |
| +#endif // IOS_WEB_WEB_STATE_UI_CRW_CONTEXT_MENU_CONTROLLER_H_ |