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

Side by Side Diff: content/child/runtime_features.cc

Issue 1198513003: Revert "Adding Chrome-side WebVR interface and Cardboard implementation" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 months 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
« no previous file with comments | « content/browser/vr/vr_device_provider.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "content/child/runtime_features.h" 5 #include "content/child/runtime_features.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 WebRuntimeFeatures::enableStaleWhileRevalidateCacheControl(true); 196 WebRuntimeFeatures::enableStaleWhileRevalidateCacheControl(true);
197 197
198 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) 198 if (command_line.HasSwitch(switches::kDisableV8IdleTasks))
199 WebRuntimeFeatures::enableV8IdleTasks(false); 199 WebRuntimeFeatures::enableV8IdleTasks(false);
200 else 200 else
201 WebRuntimeFeatures::enableV8IdleTasks(true); 201 WebRuntimeFeatures::enableV8IdleTasks(true);
202 202
203 if (command_line.HasSwitch(switches::kEnableUnsafeES3APIs)) 203 if (command_line.HasSwitch(switches::kEnableUnsafeES3APIs))
204 WebRuntimeFeatures::enableUnsafeES3APIs(true); 204 WebRuntimeFeatures::enableUnsafeES3APIs(true);
205 205
206 if (command_line.HasSwitch(switches::kEnableWebVR)) {
207 WebRuntimeFeatures::enableWebVR(true);
208 WebRuntimeFeatures::enableFeatureFromString("GeometryInterfaces", true);
209 }
210
211 // Enable explicitly enabled features, and then disable explicitly disabled 206 // Enable explicitly enabled features, and then disable explicitly disabled
212 // ones. 207 // ones.
213 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 208 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
214 std::vector<std::string> enabled_features; 209 std::vector<std::string> enabled_features;
215 base::SplitString( 210 base::SplitString(
216 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), ',', 211 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), ',',
217 &enabled_features); 212 &enabled_features);
218 for (const std::string& feature : enabled_features) { 213 for (const std::string& feature : enabled_features) {
219 WebRuntimeFeatures::enableFeatureFromString( 214 WebRuntimeFeatures::enableFeatureFromString(
220 blink::WebString::fromLatin1(feature), true); 215 blink::WebString::fromLatin1(feature), true);
221 } 216 }
222 } 217 }
223 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 218 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
224 std::vector<std::string> disabled_features; 219 std::vector<std::string> disabled_features;
225 base::SplitString( 220 base::SplitString(
226 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', 221 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',',
227 &disabled_features); 222 &disabled_features);
228 for (const std::string& feature : disabled_features) { 223 for (const std::string& feature : disabled_features) {
229 WebRuntimeFeatures::enableFeatureFromString( 224 WebRuntimeFeatures::enableFeatureFromString(
230 blink::WebString::fromLatin1(feature), false); 225 blink::WebString::fromLatin1(feature), false);
231 } 226 }
232 } 227 }
233 } 228 }
234 229
235 } // namespace content 230 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/vr/vr_device_provider.h ('k') | content/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698