Chromium Code Reviews| Index: ios/web/web_view_util.mm |
| diff --git a/ios/web/web_view_util.mm b/ios/web/web_view_util.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d38bd248cf2fe645da01922577645d8ed25635fa |
| --- /dev/null |
| +++ b/ios/web/web_view_util.mm |
| @@ -0,0 +1,35 @@ |
| +// 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. |
| + |
| +#include "ios/web/web_view_util.h" |
| + |
| +#include "base/ios/ios_util.h" |
| + |
| +namespace { |
| + |
| +bool g_force_ui_web_view = false; |
|
sdefresne
2014/12/10 15:30:24
This is a C++ file, so this should use mixedCamelC
droger
2014/12/10 17:48:55
C++ variables don't use camel case.
A search for
^
|
| + |
| +} // namespace |
| + |
| +namespace web { |
| + |
| +bool IsWKWebViewEnabled() { |
| +#if defined(ENABLE_WKWEBVIEW) |
| + // Eventually this may be a dynamic flag, but for now it's purely a |
| + // compile-time option. |
| + return !g_force_ui_web_view && base::ios::IsRunningOnIOS8OrLater(); |
| +#else |
| + return false; |
| +#endif |
| +} |
| + |
| +void SetForceUIWebView(bool flag) { |
| + g_force_ui_web_view = flag; |
| +} |
| + |
| +bool GetForceUIWebView() { |
| + return g_force_ui_web_view; |
| +} |
| + |
| +} // namespace web |