OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 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. |
| 4 |
| 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_JS_CRW_JS_INJECTION_RECEIVER_H_ |
| 6 #define IOS_WEB_PUBLIC_WEB_STATE_JS_CRW_JS_INJECTION_RECEIVER_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 #import "ios/web/public/web_state/js/crw_js_injection_evaluator.h" |
| 11 |
| 12 @class CRWJSInjectionManager; |
| 13 |
| 14 // CRWJSInjectionReceiver injects JavaScript into a web view. |
| 15 @interface CRWJSInjectionReceiver : NSObject<CRWJSInjectionEvaluator> |
| 16 |
| 17 // Init with JavaScript evaluator. |
| 18 - (id)initWithEvaluator:(id<CRWJSInjectionEvaluator>)evaluator; |
| 19 |
| 20 // Returns an instance of |jsInjectionManagerClass|. Instances of the classes |
| 21 // it depends on are created if needed. |
| 22 - (CRWJSInjectionManager*)instanceOfClass:(Class)jsInjectionManagerClass; |
| 23 |
| 24 @end |
| 25 |
| 26 @interface CRWJSInjectionReceiver (Testing) |
| 27 // Returns a dictionary of instantiated managers keyed by class. |
| 28 - (NSDictionary*)managers; |
| 29 @end |
| 30 |
| 31 #endif // IOS_WEB_PUBLIC_WEB_STATE_JS_CRW_JS_INJECTION_RECEIVER_H_ |
OLD | NEW |