OLD | NEW |
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) | 175 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) |
176 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); | 176 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); |
177 | 177 |
178 if (ui::IsOverlayScrollbarEnabled()) | 178 if (ui::IsOverlayScrollbarEnabled()) |
179 WebRuntimeFeatures::enableOverlayScrollbars(true); | 179 WebRuntimeFeatures::enableOverlayScrollbars(true); |
180 | 180 |
181 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) | 181 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) |
182 WebRuntimeFeatures::enablePreciseMemoryInfo(true); | 182 WebRuntimeFeatures::enablePreciseMemoryInfo(true); |
183 | 183 |
| 184 if (command_line.HasSwitch(switches::kEnablePrintBrowser)) |
| 185 WebRuntimeFeatures::enablePrintBrowser(true); |
| 186 |
184 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || | 187 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || |
185 enableExperimentalWebPlatformFeatures) { | 188 enableExperimentalWebPlatformFeatures) { |
186 WebRuntimeFeatures::enableNetworkInformation(true); | 189 WebRuntimeFeatures::enableNetworkInformation(true); |
187 } | 190 } |
188 | 191 |
189 if (!base::FeatureList::IsEnabled(features::kCredentialManagementAPI)) | 192 if (!base::FeatureList::IsEnabled(features::kCredentialManagementAPI)) |
190 WebRuntimeFeatures::enableCredentialManagerAPI(false); | 193 WebRuntimeFeatures::enableCredentialManagerAPI(false); |
191 | 194 |
192 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) | 195 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) |
193 WebRuntimeFeatures::enableReducedReferrerGranularity(true); | 196 WebRuntimeFeatures::enableReducedReferrerGranularity(true); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 374 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
372 std::vector<std::string> disabled_features = base::SplitString( | 375 std::vector<std::string> disabled_features = base::SplitString( |
373 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 376 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
374 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 377 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
375 for (const std::string& feature : disabled_features) | 378 for (const std::string& feature : disabled_features) |
376 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 379 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
377 } | 380 } |
378 } | 381 } |
379 | 382 |
380 } // namespace content | 383 } // namespace content |
OLD | NEW |