OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "ios/web/public/test/crw_test_js_injection_receiver.h" | 5 #import "ios/web/public/test/crw_test_js_injection_receiver.h" |
6 | 6 |
7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
8 #import <WebKit/WebKit.h> | 8 #import <WebKit/WebKit.h> |
9 | 9 |
10 #include "base/ios/weak_nsobject.h" | 10 #import "base/ios/weak_nsobject.h" |
11 #import "base/mac/scoped_nsobject.h" | 11 #import "base/mac/scoped_nsobject.h" |
12 #import "ios/web/public/web_state/js/crw_js_injection_evaluator.h" | 12 #import "ios/web/public/web_state/js/crw_js_injection_evaluator.h" |
13 #import "ios/web/web_state/ui/web_view_js_utils.h" | 13 #import "ios/web/web_state/ui/web_view_js_utils.h" |
14 | 14 |
15 @interface CRWTestWKWebViewEvaluator : NSObject<CRWJSInjectionEvaluator> { | 15 @interface CRWTestWKWebViewEvaluator : NSObject<CRWJSInjectionEvaluator> { |
16 // Web view for JavaScript evaluation. | 16 // Web view for JavaScript evaluation. |
17 base::scoped_nsobject<WKWebView> _webView; | 17 base::scoped_nsobject<WKWebView> _webView; |
18 // Set to track injected script managers. | 18 // Set to track injected script managers. |
19 base::scoped_nsobject<NSMutableSet> _injectedScriptManagers; | 19 base::scoped_nsobject<NSMutableSet> _injectedScriptManagers; |
20 } | 20 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 - (id)init { | 59 - (id)init { |
60 base::scoped_nsobject<CRWTestWKWebViewEvaluator> evaluator( | 60 base::scoped_nsobject<CRWTestWKWebViewEvaluator> evaluator( |
61 [[CRWTestWKWebViewEvaluator alloc] init]); | 61 [[CRWTestWKWebViewEvaluator alloc] init]); |
62 if (self = [super initWithEvaluator:evaluator]) | 62 if (self = [super initWithEvaluator:evaluator]) |
63 evaluator_.swap(evaluator); | 63 evaluator_.swap(evaluator); |
64 return self; | 64 return self; |
65 } | 65 } |
66 | 66 |
67 @end | 67 @end |
OLD | NEW |