OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "ios/web/public/web_view_creation_util.h" | 5 #include "ios/web/public/web_view_creation_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h" | 8 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h" |
9 #import "ios/web/web_state/web_view_internal_creation_util.h" | 9 #import "ios/web/web_state/web_view_internal_creation_util.h" |
10 | 10 |
| 11 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 12 #error "This file requires ARC support." |
| 13 #endif |
| 14 |
11 namespace web { | 15 namespace web { |
12 | 16 |
13 WKWebView* CreateWKWebView(CGRect frame, BrowserState* browser_state) { | 17 WKWebView* CreateWKWebView(CGRect frame, BrowserState* browser_state) { |
14 DCHECK(browser_state); | 18 DCHECK(browser_state); |
15 | 19 |
16 WKWebViewConfigurationProvider& config_provider = | 20 WKWebViewConfigurationProvider& config_provider = |
17 WKWebViewConfigurationProvider::FromBrowserState(browser_state); | 21 WKWebViewConfigurationProvider::FromBrowserState(browser_state); |
18 return CreateWKWebView(frame, config_provider.GetWebViewConfiguration(), | 22 return CreateWKWebView(frame, config_provider.GetWebViewConfiguration(), |
19 browser_state); | 23 browser_state); |
20 } | 24 } |
21 | 25 |
22 } // namespace web | 26 } // namespace web |
OLD | NEW |