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..8a733feae0b6e67dda287a781ed158098666f57e |
--- /dev/null |
+++ b/ios/web_view/public/cwv_user_content_controller.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_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 the |
+// configuration. |
+@interface CWVUserContentController : NSObject |
+ |
+// The user scripts associated with the configuration. |
+@property(nonatomic, copy, readonly, nonnull) |
+ NSArray<CWVUserScript*>* userScripts; |
+ |
+- (nonnull instancetype)init NS_UNAVAILABLE; |
+ |
+// Adds a user script. |
+- (void)addUserScript:(nonnull CWVUserScript*)userScript; |
+ |
+// Removes all associated user scripts. |
+- (void)removeAllUserScripts; |
+ |
+@end |
+ |
+#endif // IOS_WEB_VIEW_PUBLIC_CWV_USER_CONTENT_CONTROLLER_H_ |