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

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

Issue 3974004: Revert 63535 - Disable GPU features AcceleratingCompositing and WebGL by defa... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | Annotate | Revision Log
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/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 "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/background_contents_service.h" 10 #include "chrome/browser/background_contents_service.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 web_prefs.xss_auditor_enabled = 273 web_prefs.xss_auditor_enabled =
274 command_line.HasSwitch(switches::kEnableXSSAuditor); 274 command_line.HasSwitch(switches::kEnableXSSAuditor);
275 web_prefs.application_cache_enabled = 275 web_prefs.application_cache_enabled =
276 !command_line.HasSwitch(switches::kDisableApplicationCache); 276 !command_line.HasSwitch(switches::kDisableApplicationCache);
277 277
278 web_prefs.local_storage_enabled = 278 web_prefs.local_storage_enabled =
279 !command_line.HasSwitch(switches::kDisableLocalStorage); 279 !command_line.HasSwitch(switches::kDisableLocalStorage);
280 web_prefs.databases_enabled = 280 web_prefs.databases_enabled =
281 !command_line.HasSwitch(switches::kDisableDatabases); 281 !command_line.HasSwitch(switches::kDisableDatabases);
282 web_prefs.experimental_webgl_enabled = 282 web_prefs.experimental_webgl_enabled =
283 command_line.HasSwitch(switches::kEnableExperimentalWebGL); 283 !command_line.HasSwitch(switches::kDisableExperimentalWebGL);
284 web_prefs.site_specific_quirks_enabled = 284 web_prefs.site_specific_quirks_enabled =
285 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); 285 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks);
286 web_prefs.allow_file_access_from_file_urls = 286 web_prefs.allow_file_access_from_file_urls =
287 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); 287 command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
288 web_prefs.show_composited_layer_borders = 288 web_prefs.show_composited_layer_borders =
289 command_line.HasSwitch(switches::kShowCompositedLayerBorders); 289 command_line.HasSwitch(switches::kShowCompositedLayerBorders);
290 web_prefs.accelerated_compositing_enabled = 290 web_prefs.accelerated_compositing_enabled =
291 command_line.HasSwitch(switches::kEnableAcceleratedCompositing); 291 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing);
292 web_prefs.accelerated_2d_canvas_enabled = 292 web_prefs.accelerated_2d_canvas_enabled =
293 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); 293 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas);
294 web_prefs.memory_info_enabled = 294 web_prefs.memory_info_enabled =
295 command_line.HasSwitch(switches::kEnableMemoryInfo); 295 command_line.HasSwitch(switches::kEnableMemoryInfo);
296 web_prefs.hyperlink_auditing_enabled = 296 web_prefs.hyperlink_auditing_enabled =
297 !command_line.HasSwitch(switches::kNoPings); 297 !command_line.HasSwitch(switches::kNoPings);
298 // The user stylesheet watcher may not exist in a testing profile. 298 // The user stylesheet watcher may not exist in a testing profile.
299 if (profile->GetUserStyleSheetWatcher()) { 299 if (profile->GetUserStyleSheetWatcher()) {
300 web_prefs.user_style_sheet_enabled = true; 300 web_prefs.user_style_sheet_enabled = true;
301 web_prefs.user_style_sheet_location = 301 web_prefs.user_style_sheet_location =
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 inspector_settings->SetWithoutPathExpansion(key, 336 inspector_settings->SetWithoutPathExpansion(key,
337 Value::CreateStringValue(value)); 337 Value::CreateStringValue(value));
338 } 338 }
339 339
340 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { 340 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) {
341 DictionaryValue* inspector_settings = 341 DictionaryValue* inspector_settings =
342 profile->GetPrefs()->GetMutableDictionary( 342 profile->GetPrefs()->GetMutableDictionary(
343 prefs::kWebKitInspectorSettings); 343 prefs::kWebKitInspectorSettings);
344 inspector_settings->Clear(); 344 inspector_settings->Clear();
345 } 345 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698