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

Side by Side Diff: ios/web_view/public/cwv_web_view.h

Issue 2764773002: Add CWVUserContentController which enables injecting JavaScripts. (Closed)
Patch Set: Apply new comments. Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 #ifndef IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ 4 #ifndef IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_
5 #define IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ 5 #define IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 @class CWVWebViewConfiguration; 9 @class CWVWebViewConfiguration;
10 @protocol CWVUIDelegate; 10 @protocol CWVUIDelegate;
11 @protocol CWVTranslateDelegate; 11 @protocol CWVTranslateDelegate;
12 @protocol CWVNavigationDelegate; 12 @protocol CWVNavigationDelegate;
13 13
14 // A web view component (like WKWebView) which uses iOS Chromium's web view 14 // A web view component (like WKWebView) which uses iOS Chromium's web view
15 // implementation. 15 // implementation.
16 // 16 //
17 // In addition to WKWebView features, it allows Translate, Find In Page, 17 // In addition to WKWebView features, it allows Translate, Find In Page,
18 // Customizable Context Menus, and maybe more. 18 // Customizable Context Menus, and maybe more.
19 // 19 //
20 // Concrete instances can be created through CWV. 20 // Concrete instances can be created through CWV.
21 @interface CWVWebView : UIView 21 @interface CWVWebView : UIView
22 22
23 // The configuration of the web view.
24 @property(nonatomic, readonly, copy) CWVWebViewConfiguration* configuration;
25
23 // The view used to display web content. 26 // The view used to display web content.
24 @property(nonatomic, readonly) UIView* view; 27 @property(nonatomic, readonly) UIView* view;
25 28
26 // This web view's navigation delegate. 29 // This web view's navigation delegate.
27 @property(nonatomic, weak) id<CWVNavigationDelegate> navigationDelegate; 30 @property(nonatomic, weak) id<CWVNavigationDelegate> navigationDelegate;
28 31
29 // This web view's UI delegate 32 // This web view's UI delegate
30 @property(nonatomic, weak) id<CWVUIDelegate> UIDelegate; 33 @property(nonatomic, weak) id<CWVUIDelegate> UIDelegate;
31 34
32 // A delegate for the translation feature. 35 // A delegate for the translation feature.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 - (void)loadRequest:(NSURLRequest*)request; 79 - (void)loadRequest:(NSURLRequest*)request;
77 80
78 // Evaluates a JavaScript string. 81 // Evaluates a JavaScript string.
79 // The completion handler is invoked when script evaluation completes. 82 // The completion handler is invoked when script evaluation completes.
80 - (void)evaluateJavaScript:(NSString*)javaScriptString 83 - (void)evaluateJavaScript:(NSString*)javaScriptString
81 completionHandler:(void (^)(id, NSError*))completionHandler; 84 completionHandler:(void (^)(id, NSError*))completionHandler;
82 85
83 @end 86 @end
84 87
85 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_ 88 #endif // IOS_WEB_VIEW_PUBLIC_CWV_WEB_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698