Chromium Code Reviews| Index: ios/web/web_view_util.h |
| diff --git a/ios/web/web_view_util.h b/ios/web/web_view_util.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bc1d9af762e80813c21e5e73cf4094dc2eaa03ac |
| --- /dev/null |
| +++ b/ios/web/web_view_util.h |
| @@ -0,0 +1,24 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef IOS_WEB_WEB_VIEW_UTIL_H_ |
| +#define IOS_WEB_WEB_VIEW_UTIL_H_ |
| + |
| +namespace web { |
| + |
| +// Returns true if WKWebView is being used instead of UIWebView. |
|
stuartmorgan
2014/12/11 23:59:38
Could you add a:
TODO(stuartmorgan): Eliminate thi
|
| +bool IsWKWebViewEnabled(); |
| + |
| +// If |flag| is true, causes IsWKWebViewEnabled to return false, even if |
| +// WKWebView is enabled using the compile time flag. Should only be called from |
| +// ScopedUIWebViewEnforcer for use in unit tests that need to test UIWebView |
| +// while WKWebView is enabled. |
| +void SetForceUIWebView(bool flag); |
| + |
| +// Returns true if use of UIWebView is to be enforced. |
| +bool GetForceUIWebView(); |
| + |
| +} // web |
| + |
| +#endif // IOS_WEB_WEB_VIEW_UTIL_H_ |