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

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

Issue 1568913003: Add enable flag for pointer events in about://flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another rebase Created 4 years, 11 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/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 WebRuntimeFeatures::enableFeatureFromString( 203 WebRuntimeFeatures::enableFeatureFromString(
204 std::string("GeometryInterfaces"), true); 204 std::string("GeometryInterfaces"), true);
205 } 205 }
206 206
207 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) 207 if (command_line.HasSwitch(switches::kDisablePresentationAPI))
208 WebRuntimeFeatures::enablePresentationAPI(false); 208 WebRuntimeFeatures::enablePresentationAPI(false);
209 209
210 if (base::FeatureList::IsEnabled(features::kWebFontsIntervention)) 210 if (base::FeatureList::IsEnabled(features::kWebFontsIntervention))
211 WebRuntimeFeatures::enableWebFontsIntervention(true); 211 WebRuntimeFeatures::enableWebFontsIntervention(true);
212 212
213 if (base::FeatureList::IsEnabled(features::kPointerEvents)) {
214 WebRuntimeFeatures::enableFeatureFromString(
215 std::string("PointerEvent"), true);
216 }
217
213 // Enable explicitly enabled features, and then disable explicitly disabled 218 // Enable explicitly enabled features, and then disable explicitly disabled
214 // ones. 219 // ones.
215 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 220 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
216 std::vector<std::string> enabled_features = base::SplitString( 221 std::vector<std::string> enabled_features = base::SplitString(
217 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), 222 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
218 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 223 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
219 for (const std::string& feature : enabled_features) 224 for (const std::string& feature : enabled_features)
220 WebRuntimeFeatures::enableFeatureFromString(feature, true); 225 WebRuntimeFeatures::enableFeatureFromString(feature, true);
221 } 226 }
222 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 227 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
223 std::vector<std::string> disabled_features = base::SplitString( 228 std::vector<std::string> disabled_features = base::SplitString(
224 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 229 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
225 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 230 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
226 for (const std::string& feature : disabled_features) 231 for (const std::string& feature : disabled_features)
227 WebRuntimeFeatures::enableFeatureFromString(feature, false); 232 WebRuntimeFeatures::enableFeatureFromString(feature, false);
228 } 233 }
229 } 234 }
230 235
231 } // namespace content 236 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698