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

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

Issue 3698003: Lab strings for accelerated compositor, canvas 2d, and WebGL added. Canvas Lab exposed. (Closed)
Patch Set: Restricted to Linux and Win only (good catch). Created 10 years, 2 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/labs.h" 5 #include "chrome/browser/labs.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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 #if defined(GOOGLE_CHROME_BUILD) 123 #if defined(GOOGLE_CHROME_BUILD)
124 // For a Chrome build, we know we have a PDF plug-in, and so we'll 124 // For a Chrome build, we know we have a PDF plug-in, and so we'll
125 // enable by platform as we get things working. 125 // enable by platform as we get things working.
126 0, 126 0,
127 #else 127 #else
128 // Otherwise, where we know it could be working if a viable PDF 128 // Otherwise, where we know it could be working if a viable PDF
129 // plug-in could be supplied, we'll keep the lab enabled. 129 // plug-in could be supplied, we'll keep the lab enabled.
130 kOsWin, 130 kOsWin,
131 #endif 131 #endif
132 switches::kEnableCloudPrintProxy 132 switches::kEnableCloudPrintProxy
133 },
134 // FIXME(scheib): Add Labs entry for accelerated Compositing,
135 // or pull it and the strings in generated_resources.grd by Dec 2010
136 //{
137 // "gpu-compositing", // Do not change; see above
138 // IDS_LABS_ACCELERATED_COMPOSITING_NAME,
139 // IDS_LABS_ACCELERATED_COMPOSITING_DESCRIPTION,
140 // kOsAll,
141 // switches::kDisableAcceleratedCompositing
142 //},
143 {
144 "gpu-canvas-2d", // Do not change; see above
145 IDS_LABS_ACCELERATED_CANVAS_2D_NAME,
146 IDS_LABS_ACCELERATED_CANVAS_2D_DESCRIPTION,
147 kOsWin | kOsLinux,
148 switches::kEnableAccelerated2dCanvas
133 } 149 }
150 // FIXME(scheib): Add Labs entry for WebGL,
151 // or pull it and the strings in generated_resources.grd by Dec 2010
152 //{
153 // "webgl", // Do not change; see above
154 // IDS_LABS_WEBGL_NAME,
155 // IDS_LABS_WEBGL_DESCRIPTION,
156 // kOsAll,
157 // switches::kDisableExperimentalWebGL
158 //}
134 }; 159 };
135 160
136 // Extracts the list of enabled lab experiments from preferences and stores them 161 // Extracts the list of enabled lab experiments from preferences and stores them
137 // in a set. 162 // in a set.
138 void GetEnabledLabs(const PrefService* prefs, std::set<std::string>* result) { 163 void GetEnabledLabs(const PrefService* prefs, std::set<std::string>* result) {
139 const ListValue* enabled_experiments = prefs->GetList( 164 const ListValue* enabled_experiments = prefs->GetList(
140 prefs::kEnabledLabsExperiments); 165 prefs::kEnabledLabsExperiments);
141 if (!enabled_experiments) 166 if (!enabled_experiments)
142 return; 167 return;
143 168
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 310
286 if (enable) 311 if (enable)
287 enabled_experiments.insert(internal_name); 312 enabled_experiments.insert(internal_name);
288 else 313 else
289 enabled_experiments.erase(internal_name); 314 enabled_experiments.erase(internal_name);
290 315
291 SetEnabledLabs(prefs, enabled_experiments); 316 SetEnabledLabs(prefs, enabled_experiments);
292 } 317 }
293 318
294 } // namespace Labs 319 } // namespace Labs
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698