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

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

Issue 1134473003: bluetooth: Add a WebBluetooth command line flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add to flag to histogram Created 5 years, 7 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
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8) 80 if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8)
81 WebRuntimeFeatures::enableScreenOrientation(false); 81 WebRuntimeFeatures::enableScreenOrientation(false);
82 #endif // OS_WIN 82 #endif // OS_WIN
83 } 83 }
84 84
85 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( 85 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
86 const base::CommandLine& command_line) { 86 const base::CommandLine& command_line) {
87 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) 87 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures))
88 WebRuntimeFeatures::enableExperimentalFeatures(true); 88 WebRuntimeFeatures::enableExperimentalFeatures(true);
89 89
90 if (command_line.HasSwitch(switches::kEnableWebBluetooth))
91 WebRuntimeFeatures::enableWebBluetooth(true);
92
90 SetRuntimeFeatureDefaultsForPlatform(); 93 SetRuntimeFeatureDefaultsForPlatform();
91 94
92 if (command_line.HasSwitch(switches::kDisableDatabases)) 95 if (command_line.HasSwitch(switches::kDisableDatabases))
93 WebRuntimeFeatures::enableDatabase(false); 96 WebRuntimeFeatures::enableDatabase(false);
94 97
95 if (command_line.HasSwitch(scheduler::switches::kDisableBlinkScheduler)) 98 if (command_line.HasSwitch(scheduler::switches::kDisableBlinkScheduler))
96 WebRuntimeFeatures::enableBlinkScheduler(false); 99 WebRuntimeFeatures::enableBlinkScheduler(false);
97 100
98 if (command_line.HasSwitch(switches::kDisableMediaSource)) 101 if (command_line.HasSwitch(switches::kDisableMediaSource))
99 WebRuntimeFeatures::enableMediaSource(false); 102 WebRuntimeFeatures::enableMediaSource(false);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', 218 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',',
216 &disabled_features); 219 &disabled_features);
217 for (const std::string& feature : disabled_features) { 220 for (const std::string& feature : disabled_features) {
218 WebRuntimeFeatures::enableFeatureFromString( 221 WebRuntimeFeatures::enableFeatureFromString(
219 blink::WebString::fromLatin1(feature), false); 222 blink::WebString::fromLatin1(feature), false);
220 } 223 }
221 } 224 }
222 } 225 }
223 226
224 } // namespace content 227 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698