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

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

Issue 1962263002: Introduce FontCache content scaling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win layout test fix Created 4 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/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 if (base::FeatureList::IsEnabled(features::kNewMediaPlaybackUi)) 189 if (base::FeatureList::IsEnabled(features::kNewMediaPlaybackUi))
190 WebRuntimeFeatures::enableNewMediaPlaybackUi(true); 190 WebRuntimeFeatures::enableNewMediaPlaybackUi(true);
191 191
192 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator)) 192 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator))
193 WebRuntimeFeatures::enableDocumentWriteEvaluator(true); 193 WebRuntimeFeatures::enableDocumentWriteEvaluator(true);
194 194
195 WebRuntimeFeatures::enableMediaDocumentDownloadButton( 195 WebRuntimeFeatures::enableMediaDocumentDownloadButton(
196 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton)); 196 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton));
197 197
198 if (base::FeatureList::IsEnabled(features::kPointerEvents)) { 198 if (base::FeatureList::IsEnabled(features::kPointerEvents)) {
199 WebRuntimeFeatures::enableFeatureFromString( 199 WebRuntimeFeatures::enableFeatureFromString(
200 std::string("PointerEvent"), true); 200 std::string("PointerEvent"), true);
201 } 201 }
202 202
203 WebRuntimeFeatures::enableFeatureFromString(
204 "FontCacheScaling",
205 base::FeatureList::IsEnabled(features::kFontCacheScaling));
206
203 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations)) 207 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations))
204 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false); 208 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false);
205 209
206 // Enable explicitly enabled features, and then disable explicitly disabled 210 // Enable explicitly enabled features, and then disable explicitly disabled
207 // ones. 211 // ones.
208 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 212 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
209 std::vector<std::string> enabled_features = base::SplitString( 213 std::vector<std::string> enabled_features = base::SplitString(
210 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), 214 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
211 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 215 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
212 for (const std::string& feature : enabled_features) 216 for (const std::string& feature : enabled_features)
213 WebRuntimeFeatures::enableFeatureFromString(feature, true); 217 WebRuntimeFeatures::enableFeatureFromString(feature, true);
214 } 218 }
215 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 219 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
216 std::vector<std::string> disabled_features = base::SplitString( 220 std::vector<std::string> disabled_features = base::SplitString(
217 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 221 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
218 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 222 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
219 for (const std::string& feature : disabled_features) 223 for (const std::string& feature : disabled_features)
220 WebRuntimeFeatures::enableFeatureFromString(feature, false); 224 WebRuntimeFeatures::enableFeatureFromString(feature, false);
221 } 225 }
222 } 226 }
223 227
224 } // namespace content 228 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698