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

Unified Diff: ios/web_view/public/cwv_user_content_controller.h

Issue 2764773002: Add CWVUserContentController which enables injecting JavaScripts. (Closed)
Patch Set: Rebase. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web_view/public/BUILD.gn ('k') | ios/web_view/public/cwv_user_script.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ios/web_view/public/BUILD.gn ('k') | ios/web_view/public/cwv_user_script.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698