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

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

Issue 2764773002: Add CWVUserContentController which enables injecting JavaScripts. (Closed)
Patch Set: Add license. 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // 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.
4 #ifndef IOS_WEB_VIEW_PUBLIC_CWV_USER_CONTENT_CONTROLLER_H_
5 #define IOS_WEB_VIEW_PUBLIC_CWV_USER_CONTENT_CONTROLLER_H_
6
7 #import <Foundation/Foundation.h>
8
9 @class CWVUserScript;
10
11 // 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.
12 // the configuration.
13 @interface CWVUserContentController : NSObject
14
15 // The user scripts associated with the configuration.
16 @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
17
18 - (instancetype)init NS_UNAVAILABLE;
19
20 // Adds a user script.
21 - (void)addUserScript:(CWVUserScript*)userScript;
22
23 // Removes all associated user scripts.
24 - (void)removeAllUserScripts;
25
26 @end
27
28 #endif // IOS_WEB_VIEW_PUBLIC_CWV_USER_CONTENT_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698