Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: ios/web/web_view_util.mm

Issue 790803002: Upstream JavaScript injection for iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« ios/web/web_view_util.h ('K') | « ios/web/web_view_util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ios/web/web_view_util.h"
6
7 #include "base/ios/ios_util.h"
8
9 namespace {
10
11 // If true, UIWebView is always used.
sdefresne 2014/12/11 15:25:12 nit: // If true, UIWebView is always used, even if
12 bool g_force_ui_web_view = false;
13
14 } // namespace
15
16 namespace web {
17
18 bool IsWKWebViewEnabled() {
19 #if defined(ENABLE_WKWEBVIEW)
20 // Eventually this may be a dynamic flag, but for now it's purely a
21 // compile-time option.
22 return !g_force_ui_web_view && base::ios::IsRunningOnIOS8OrLater();
23 #else
24 return false;
25 #endif
26 }
27
28 void SetForceUIWebView(bool flag) {
29 g_force_ui_web_view = flag;
30 }
31
32 bool GetForceUIWebView() {
33 return g_force_ui_web_view;
34 }
35
36 } // namespace web
OLDNEW
« ios/web/web_view_util.h ('K') | « ios/web/web_view_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698