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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 266743003: Add flag to enable rendering of text using signed distance fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor formatting cleanup Created 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 196 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
197 switches::kDisableImplSidePainting, ""} 197 switches::kDisableImplSidePainting, ""}
198 }; 198 };
199 199
200 const Experiment::Choice kLCDTextChoices[] = { 200 const Experiment::Choice kLCDTextChoices[] = {
201 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 201 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
202 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableLCDText, ""}, 202 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, switches::kEnableLCDText, ""},
203 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableLCDText, ""} 203 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kDisableLCDText, ""}
204 }; 204 };
205 205
206 const Experiment::Choice kDistanceFieldTextChoices[] = {
207 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
208 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
209 switches::kEnableDistanceFieldText, "" },
210 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
211 switches::kDisableDistanceFieldText, "" }
212 };
213
206 #ifndef USE_AURA 214 #ifndef USE_AURA
207 const Experiment::Choice kDelegatedRendererChoices[] = { 215 const Experiment::Choice kDelegatedRendererChoices[] = {
208 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 216 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
209 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 217 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
210 switches::kEnableDelegatedRenderer, ""}, 218 switches::kEnableDelegatedRenderer, ""},
211 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 219 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
212 switches::kDisableDelegatedRenderer, ""} 220 switches::kDisableDelegatedRenderer, ""}
213 }; 221 };
214 #endif 222 #endif
215 223
(...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1843 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI) 1851 SINGLE_VALUE_TYPE(switches::kEnableEmbeddedSearchAPI)
1844 }, 1852 },
1845 { 1853 {
1846 "enable-app-install-alerts", 1854 "enable-app-install-alerts",
1847 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME, 1855 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_NAME,
1848 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION, 1856 IDS_FLAGS_ENABLE_APP_INSTALL_ALERTS_DESCRIPTION,
1849 kOsAndroid, 1857 kOsAndroid,
1850 SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts) 1858 SINGLE_VALUE_TYPE(switches::kEnableAppInstallAlerts)
1851 }, 1859 },
1852 #endif 1860 #endif
1861 {
1862 "distance-field-text",
1863 IDS_FLAGS_DISTANCE_FIELD_TEXT_NAME,
1864 IDS_FLAGS_DISTANCE_FIELD_TEXT_DESCRIPTION,
1865 kOsAll,
1866 MULTI_VALUE_TYPE(kDistanceFieldTextChoices)
1867 },
1853 }; 1868 };
1854 1869
1855 const Experiment* experiments = kExperiments; 1870 const Experiment* experiments = kExperiments;
1856 size_t num_experiments = arraysize(kExperiments); 1871 size_t num_experiments = arraysize(kExperiments);
1857 1872
1858 // Stores and encapsulates the little state that about:flags has. 1873 // Stores and encapsulates the little state that about:flags has.
1859 class FlagsState { 1874 class FlagsState {
1860 public: 1875 public:
1861 FlagsState() : needs_restart_(false) {} 1876 FlagsState() : needs_restart_(false) {}
1862 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, 1877 void ConvertFlagsToSwitches(FlagsStorage* flags_storage,
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 } 2382 }
2368 2383
2369 const Experiment* GetExperiments(size_t* count) { 2384 const Experiment* GetExperiments(size_t* count) {
2370 *count = num_experiments; 2385 *count = num_experiments;
2371 return experiments; 2386 return experiments;
2372 } 2387 }
2373 2388
2374 } // namespace testing 2389 } // namespace testing
2375 2390
2376 } // namespace about_flags 2391 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698