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

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

Issue 2543723002: Add switch to disable WebVR gesture requirement
Patch Set: Addressed ddorwin@'s naming comments Created 4 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
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/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 WebRuntimeFeatures::enablePermissionsAPI(false); 192 WebRuntimeFeatures::enablePermissionsAPI(false);
193 193
194 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) 194 if (command_line.HasSwitch(switches::kDisableV8IdleTasks))
195 WebRuntimeFeatures::enableV8IdleTasks(false); 195 WebRuntimeFeatures::enableV8IdleTasks(false);
196 else 196 else
197 WebRuntimeFeatures::enableV8IdleTasks(true); 197 WebRuntimeFeatures::enableV8IdleTasks(true);
198 198
199 if (command_line.HasSwitch(switches::kEnableWebVR)) 199 if (command_line.HasSwitch(switches::kEnableWebVR))
200 WebRuntimeFeatures::enableWebVR(true); 200 WebRuntimeFeatures::enableWebVR(true);
201 201
202 if (command_line.HasSwitch(
203 switches::kDisableWebVrGestureRequirementForTests))
204 WebRuntimeFeatures::enableWebVrGestureRequirement(false);
205
202 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) 206 if (command_line.HasSwitch(switches::kDisablePresentationAPI))
203 WebRuntimeFeatures::enablePresentationAPI(false); 207 WebRuntimeFeatures::enablePresentationAPI(false);
204 208
205 const std::string webfonts_intervention_v2_group_name = 209 const std::string webfonts_intervention_v2_group_name =
206 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); 210 base::FieldTrialList::FindFullName("WebFontsInterventionV2");
207 const std::string webfonts_intervention_v2_about_flag = 211 const std::string webfonts_intervention_v2_about_flag =
208 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); 212 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2);
209 if (!webfonts_intervention_v2_about_flag.empty()) { 213 if (!webfonts_intervention_v2_about_flag.empty()) {
210 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( 214 WebRuntimeFeatures::enableWebFontsInterventionV2With2G(
211 webfonts_intervention_v2_about_flag.compare( 215 webfonts_intervention_v2_about_flag.compare(
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 343 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
340 std::vector<std::string> disabled_features = base::SplitString( 344 std::vector<std::string> disabled_features = base::SplitString(
341 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 345 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
342 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 346 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
343 for (const std::string& feature : disabled_features) 347 for (const std::string& feature : disabled_features)
344 WebRuntimeFeatures::enableFeatureFromString(feature, false); 348 WebRuntimeFeatures::enableFeatureFromString(feature, false);
345 } 349 }
346 } 350 }
347 351
348 } // namespace content 352 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698