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

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

Issue 2806263005: Convert the overlay scrollbar flag to use FeatureList (Closed)
Patch Set: dtapuska comment addressed Created 3 years, 8 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"
11 #include "base/metrics/field_trial.h" 11 #include "base/metrics/field_trial.h"
12 #include "base/strings/string_split.h" 12 #include "base/strings/string_split.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "content/common/content_switches_internal.h" 15 #include "content/common/content_switches_internal.h"
16 #include "content/public/common/content_features.h" 16 #include "content/public/common/content_features.h"
17 #include "content/public/common/content_switches.h" 17 #include "content/public/common/content_switches.h"
18 #include "services/device/public/cpp/device_features.h" 18 #include "services/device/public/cpp/device_features.h"
19 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 19 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
20 #include "ui/gl/gl_switches.h" 20 #include "ui/gl/gl_switches.h"
21 #include "ui/native_theme/native_theme_switches.h" 21 #include "ui/native_theme/native_theme_features.h"
22 22
23 using blink::WebRuntimeFeatures; 23 using blink::WebRuntimeFeatures;
24 24
25 namespace content { 25 namespace content {
26 26
27 static void SetRuntimeFeatureDefaultsForPlatform() { 27 static void SetRuntimeFeatureDefaultsForPlatform() {
28 #if defined(OS_ANDROID) 28 #if defined(OS_ANDROID)
29 // Android does not have support for PagePopup 29 // Android does not have support for PagePopup
30 WebRuntimeFeatures::EnablePagePopup(false); 30 WebRuntimeFeatures::EnablePagePopup(false);
31 // No plan to support complex UI for date/time INPUT types. 31 // No plan to support complex UI for date/time INPUT types.
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 388 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
389 std::vector<std::string> disabled_features = base::SplitString( 389 std::vector<std::string> disabled_features = base::SplitString(
390 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 390 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
391 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 391 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
392 for (const std::string& feature : disabled_features) 392 for (const std::string& feature : disabled_features)
393 WebRuntimeFeatures::EnableFeatureFromString(feature, false); 393 WebRuntimeFeatures::EnableFeatureFromString(feature, false);
394 } 394 }
395 } 395 }
396 396
397 } // namespace content 397 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698