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

Unified Diff: ios/web_view/public/cwv_user_script.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/cwv_user_content_controller.h ('k') | ios/web_view/public/cwv_web_view.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_script.h
diff --git a/ios/web_view/public/cwv_user_script.h b/ios/web_view/public/cwv_user_script.h
new file mode 100644
index 0000000000000000000000000000000000000000..1de588cf4941a24faa81b8538ef38d64f9c2b864
--- /dev/null
+++ b/ios/web_view/public/cwv_user_script.h
@@ -0,0 +1,24 @@
+// 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_SCRIPT_H_
+#define IOS_WEB_VIEW_PUBLIC_CWV_USER_SCRIPT_H_
+
+#import <Foundation/Foundation.h>
+
+// User Script to be injected into main frame of CWVWebView after
+// window.document is created, but before other content is loaded (i.e., at the
+// same timing as WKUserScriptInjectionTimeAtDocumentStart).
+@interface CWVUserScript : NSObject
+
+// JavaScript source code.
+@property(nonatomic, copy, readonly, nonnull) NSString* source;
+
+- (nonnull instancetype)init NS_UNAVAILABLE;
+
+- (nonnull instancetype)initWithSource:(nonnull NSString*)source;
+
+@end
+
+#endif // IOS_WEB_VIEW_PUBLIC_CWV_USER_SCRIPT_H_
« no previous file with comments | « ios/web_view/public/cwv_user_content_controller.h ('k') | ios/web_view/public/cwv_web_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698