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

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

Issue 2301463002: Added runtime flag for Gamepad Extensions (Closed)
Patch Set: Rebase Created 4 years, 3 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 | « chrome/browser/about_flags.cc ('k') | content/public/common/content_features.h » ('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/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); 280 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true);
281 281
282 #if defined(OS_ANDROID) 282 #if defined(OS_ANDROID)
283 WebRuntimeFeatures::enablePaymentRequest( 283 WebRuntimeFeatures::enablePaymentRequest(
284 base::FeatureList::IsEnabled(features::kWebPayments)); 284 base::FeatureList::IsEnabled(features::kWebPayments));
285 #endif 285 #endif
286 286
287 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker)) 287 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker))
288 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true); 288 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true);
289 289
290 if (base::FeatureList::IsEnabled(features::kGamepadExtensions))
291 WebRuntimeFeatures::enableGamepadExtensions(true);
292
290 // Enable explicitly enabled features, and then disable explicitly disabled 293 // Enable explicitly enabled features, and then disable explicitly disabled
291 // ones. 294 // ones.
292 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 295 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
293 std::vector<std::string> enabled_features = base::SplitString( 296 std::vector<std::string> enabled_features = base::SplitString(
294 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), 297 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
295 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 298 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
296 for (const std::string& feature : enabled_features) 299 for (const std::string& feature : enabled_features)
297 WebRuntimeFeatures::enableFeatureFromString(feature, true); 300 WebRuntimeFeatures::enableFeatureFromString(feature, true);
298 } 301 }
299 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 302 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
300 std::vector<std::string> disabled_features = base::SplitString( 303 std::vector<std::string> disabled_features = base::SplitString(
301 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 304 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
302 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 305 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
303 for (const std::string& feature : disabled_features) 306 for (const std::string& feature : disabled_features)
304 WebRuntimeFeatures::enableFeatureFromString(feature, false); 307 WebRuntimeFeatures::enableFeatureFromString(feature, false);
305 } 308 }
306 } 309 }
307 310
308 } // namespace content 311 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698