| 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 #ifndef IOS_WEB_WEB_VIEW_UTIL_H_ | 5 #ifndef IOS_WEB_WEB_VIEW_UTIL_H_ |
| 6 #define IOS_WEB_WEB_VIEW_UTIL_H_ | 6 #define IOS_WEB_WEB_VIEW_UTIL_H_ |
| 7 | 7 |
| 8 namespace web { | 8 namespace web { |
| 9 | 9 |
| 10 // Returns true if WKWebView is being used instead of UIWebView. | 10 // Returns true if WKWebView is supported on current OS/platform/arch. |
| 11 // TODO(stuartmorgan): Eliminate this global flag in favor of a per-web-view | 11 bool IsWKWebViewSupported(); |
| 12 // flag. | |
| 13 bool IsWKWebViewEnabled(); | |
| 14 | |
| 15 // If |flag| is true, causes IsWKWebViewEnabled to return false, even if | |
| 16 // WKWebView is enabled using the compile time flag. Should only be called from | |
| 17 // ScopedUIWebViewEnforcer for use in unit tests that need to test UIWebView | |
| 18 // while WKWebView is enabled. | |
| 19 void SetForceUIWebView(bool flag); | |
| 20 | |
| 21 // Returns true if use of UIWebView is to be enforced. | |
| 22 bool GetForceUIWebView(); | |
| 23 | 12 |
| 24 } // web | 13 } // web |
| 25 | 14 |
| 26 #endif // IOS_WEB_WEB_VIEW_UTIL_H_ | 15 #endif // IOS_WEB_WEB_VIEW_UTIL_H_ |
| OLD | NEW |