OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/native_controller_test_util.h" | 5 #import "ios/web/public/test/native_controller_test_util.h" |
6 | 6 |
7 #import "ios/web/web_state/ui/crw_web_controller.h" | 7 #import "ios/web/web_state/ui/crw_web_controller.h" |
8 #import "ios/web/web_state/web_state_impl.h" | 8 #import "ios/web/web_state/web_state_impl.h" |
9 | 9 |
| 10 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 11 #error "This file requires ARC support." |
| 12 #endif |
| 13 |
10 namespace web { | 14 namespace web { |
11 namespace test { | 15 namespace test { |
12 | 16 |
13 id<CRWNativeContent> GetCurrentNativeController(WebState* web_state) { | 17 id<CRWNativeContent> GetCurrentNativeController(WebState* web_state) { |
14 web::WebStateImpl* web_state_impl = | 18 web::WebStateImpl* web_state_impl = |
15 static_cast<web::WebStateImpl*>(web_state); | 19 static_cast<web::WebStateImpl*>(web_state); |
16 return [web_state_impl->GetWebController() nativeController]; | 20 return [web_state_impl->GetWebController() nativeController]; |
17 } | 21 } |
18 | 22 |
19 } // namespace test | 23 } // namespace test |
20 } // namespace web | 24 } // namespace web |
OLD | NEW |