Index: ios/web_view/public/cwv_user_content_controller.h |
diff --git a/ios/web_view/public/cwv_user_content_controller.h b/ios/web_view/public/cwv_user_content_controller.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..13e9aeab44256b92b257430d69813a2d69aab772 |
--- /dev/null |
+++ b/ios/web_view/public/cwv_user_content_controller.h |
@@ -0,0 +1,28 @@ |
+// 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. |
Eugene But (OOO till 7-30)
2017/03/21 16:47:55
Add a linebreak
Hiroshi Ichikawa
2017/03/22 04:52:52
Done.
|
+#ifndef IOS_WEB_VIEW_PUBLIC_CWV_USER_CONTENT_CONTROLLER_H_ |
+#define IOS_WEB_VIEW_PUBLIC_CWV_USER_CONTENT_CONTROLLER_H_ |
+ |
+#import <Foundation/Foundation.h> |
+ |
+@class CWVUserScript; |
+ |
+// Allows injecting custom scripts into CWVWebView created with |
michaeldo
2017/03/21 16:12:35
nit: re-wrap comment: move "the" to line 11
Hiroshi Ichikawa
2017/03/22 04:52:52
Done.
|
+// the configuration. |
+@interface CWVUserContentController : NSObject |
+ |
+// The user scripts associated with the configuration. |
+@property(copy, readonly) NSArray<CWVUserScript*>* userScripts; |
michaeldo
2017/03/21 16:12:35
Please add nullability annotations to this newly c
Eugene But (OOO till 7-30)
2017/03/21 16:47:55
nonatomic ?
Hiroshi Ichikawa
2017/03/22 04:52:53
Done.
Hiroshi Ichikawa
2017/03/22 04:52:53
Done. But adding nonnull annotation caused a weird
michaeldo
2017/03/22 23:03:32
I believe if you make userScripts a property in th
Hiroshi Ichikawa
2017/03/23 02:48:05
Well, its type as a public property should be NSAr
|
+ |
+- (instancetype)init NS_UNAVAILABLE; |
+ |
+// Adds a user script. |
+- (void)addUserScript:(CWVUserScript*)userScript; |
+ |
+// Removes all associated user scripts. |
+- (void)removeAllUserScripts; |
+ |
+@end |
+ |
+#endif // IOS_WEB_VIEW_PUBLIC_CWV_USER_CONTENT_CONTROLLER_H_ |