| 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 #import "ios/web/web_state/web_view_internal_creation_util.h" | 5 #import "ios/web/web_state/web_view_internal_creation_util.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
| 9 #include "ios/web/public/web_client.h" | 9 #import "ios/web/public/web_client.h" |
| 10 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h" | 10 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h" |
| 11 | 11 |
| 12 namespace web { | 12 namespace web { |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 // Verifies the preconditions for creating a WKWebView. Must be called before | 16 // Verifies the preconditions for creating a WKWebView. Must be called before |
| 17 // a WKWebView is allocated. Not verifying the preconditions before creating | 17 // a WKWebView is allocated. Not verifying the preconditions before creating |
| 18 // a WKWebView will lead to undefined behavior. | 18 // a WKWebView will lead to undefined behavior. |
| 19 void VerifyWKWebViewCreationPreConditions( | 19 void VerifyWKWebViewCreationPreConditions( |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 WKWebView* BuildWKWebView(CGRect frame, | 59 WKWebView* BuildWKWebView(CGRect frame, |
| 60 WKWebViewConfiguration* configuration, | 60 WKWebViewConfiguration* configuration, |
| 61 BrowserState* browser_state) { | 61 BrowserState* browser_state) { |
| 62 BOOL use_desktop_user_agent = NO; | 62 BOOL use_desktop_user_agent = NO; |
| 63 return BuildWKWebView(frame, configuration, browser_state, | 63 return BuildWKWebView(frame, configuration, browser_state, |
| 64 use_desktop_user_agent); | 64 use_desktop_user_agent); |
| 65 } | 65 } |
| 66 | 66 |
| 67 } // namespace web | 67 } // namespace web |
| OLD | NEW |