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

Side by Side Diff: chrome/browser/tab_contents/render_view_host_delegate_helper.cc

Issue 246042: Added command line argument --enable-webgl to facilitate turning on... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/tab_contents/render_view_host_delegate_helper.h" 5 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser.h" 8 #include "chrome/browser/browser.h"
9 #include "chrome/browser/character_encoding.h" 9 #include "chrome/browser/character_encoding.h"
10 #include "chrome/browser/profile.h" 10 #include "chrome/browser/profile.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 !command_line.HasSwitch(switches::kDisableXSSAuditor); 177 !command_line.HasSwitch(switches::kDisableXSSAuditor);
178 web_prefs.application_cache_enabled = 178 web_prefs.application_cache_enabled =
179 command_line.HasSwitch(switches::kEnableApplicationCache); 179 command_line.HasSwitch(switches::kEnableApplicationCache);
180 180
181 web_prefs.local_storage_enabled = 181 web_prefs.local_storage_enabled =
182 command_line.HasSwitch(switches::kEnableLocalStorage); 182 command_line.HasSwitch(switches::kEnableLocalStorage);
183 web_prefs.databases_enabled = 183 web_prefs.databases_enabled =
184 command_line.HasSwitch(switches::kEnableDatabases); 184 command_line.HasSwitch(switches::kEnableDatabases);
185 web_prefs.session_storage_enabled = 185 web_prefs.session_storage_enabled =
186 command_line.HasSwitch(switches::kEnableSessionStorage); 186 command_line.HasSwitch(switches::kEnableSessionStorage);
187 web_prefs.experimental_webgl_enabled =
188 command_line.HasSwitch(switches::kEnableExperimentalWebGL);
187 } 189 }
188 190
189 web_prefs.uses_universal_detector = 191 web_prefs.uses_universal_detector =
190 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector); 192 prefs->GetBoolean(prefs::kWebKitUsesUniversalDetector);
191 web_prefs.text_areas_are_resizable = 193 web_prefs.text_areas_are_resizable =
192 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable); 194 prefs->GetBoolean(prefs::kWebKitTextAreasAreResizable);
193 195
194 // User CSS is currently disabled because it crashes chrome. See 196 // User CSS is currently disabled because it crashes chrome. See
195 // webkit/glue/webpreferences.h for more details. 197 // webkit/glue/webpreferences.h for more details.
196 198
197 // Make sure we will set the default_encoding with canonical encoding name. 199 // Make sure we will set the default_encoding with canonical encoding name.
198 web_prefs.default_encoding = 200 web_prefs.default_encoding =
199 CharacterEncoding::GetCanonicalEncodingNameByAliasName( 201 CharacterEncoding::GetCanonicalEncodingNameByAliasName(
200 web_prefs.default_encoding); 202 web_prefs.default_encoding);
201 if (web_prefs.default_encoding.empty()) { 203 if (web_prefs.default_encoding.empty()) {
202 prefs->ClearPref(prefs::kDefaultCharset); 204 prefs->ClearPref(prefs::kDefaultCharset);
203 web_prefs.default_encoding = WideToASCII( 205 web_prefs.default_encoding = WideToASCII(
204 prefs->GetString(prefs::kDefaultCharset)); 206 prefs->GetString(prefs::kDefaultCharset));
205 } 207 }
206 DCHECK(!web_prefs.default_encoding.empty()); 208 DCHECK(!web_prefs.default_encoding.empty());
207 209
208 if (is_dom_ui) { 210 if (is_dom_ui) {
209 web_prefs.loads_images_automatically = true; 211 web_prefs.loads_images_automatically = true;
210 web_prefs.javascript_enabled = true; 212 web_prefs.javascript_enabled = true;
211 } 213 }
212 214
213 return web_prefs; 215 return web_prefs;
214 } 216 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698