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

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: Added comment to explain why we add the flag. 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8) 85 if (base::win::OSInfo::GetInstance()->version() >= base::win::VERSION_WIN8)
86 WebRuntimeFeatures::enableScreenOrientation(false); 86 WebRuntimeFeatures::enableScreenOrientation(false);
87 #endif // OS_WIN 87 #endif // OS_WIN
88 } 88 }
89 89
90 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( 90 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
91 const base::CommandLine& command_line) { 91 const base::CommandLine& command_line) {
92 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) 92 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures))
93 WebRuntimeFeatures::enableExperimentalFeatures(true); 93 WebRuntimeFeatures::enableExperimentalFeatures(true);
94 94
95 if (command_line.HasSwitch(switches::kEnableWebBluetooth))
jochen (gone - plz use gerrit) 2015/05/15 06:11:32 this should be in chrome/renderer/chrome_render_pr
ortuno 2015/05/15 16:31:14 Why? If we are extracting the feature from Experim
96 WebRuntimeFeatures::enableWebBluetooth(true);
97
95 SetRuntimeFeatureDefaultsForPlatform(); 98 SetRuntimeFeatureDefaultsForPlatform();
96 99
97 if (command_line.HasSwitch(switches::kDisableDatabases)) 100 if (command_line.HasSwitch(switches::kDisableDatabases))
98 WebRuntimeFeatures::enableDatabase(false); 101 WebRuntimeFeatures::enableDatabase(false);
99 102
100 if (command_line.HasSwitch(scheduler::switches::kDisableBlinkScheduler)) 103 if (command_line.HasSwitch(scheduler::switches::kDisableBlinkScheduler))
101 WebRuntimeFeatures::enableBlinkScheduler(false); 104 WebRuntimeFeatures::enableBlinkScheduler(false);
102 105
103 if (command_line.HasSwitch(switches::kDisableMediaSource)) 106 if (command_line.HasSwitch(switches::kDisableMediaSource))
104 WebRuntimeFeatures::enableMediaSource(false); 107 WebRuntimeFeatures::enableMediaSource(false);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', 223 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',',
221 &disabled_features); 224 &disabled_features);
222 for (const std::string& feature : disabled_features) { 225 for (const std::string& feature : disabled_features) {
223 WebRuntimeFeatures::enableFeatureFromString( 226 WebRuntimeFeatures::enableFeatureFromString(
224 blink::WebString::fromLatin1(feature), false); 227 blink::WebString::fromLatin1(feature), false);
225 } 228 }
226 } 229 }
227 } 230 }
228 231
229 } // namespace content 232 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698