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

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

Issue 2873074: Add a command line switch to control accelerated 2d canvas (Closed)
Patch Set: Serialize the preference over IPC so the renderer can see it Created 10 years, 4 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 | « no previous file | chrome/common/chrome_switches.h » ('j') | chrome/common/chrome_switches.cc » ('J')
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/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 "chrome/browser/background_contents_service.h" 9 #include "chrome/browser/background_contents_service.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 web_prefs.experimental_webgl_enabled = 261 web_prefs.experimental_webgl_enabled =
262 command_line.HasSwitch(switches::kEnableExperimentalWebGL); 262 command_line.HasSwitch(switches::kEnableExperimentalWebGL);
263 web_prefs.site_specific_quirks_enabled = 263 web_prefs.site_specific_quirks_enabled =
264 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); 264 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks);
265 web_prefs.allow_file_access_from_file_urls = 265 web_prefs.allow_file_access_from_file_urls =
266 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); 266 command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
267 web_prefs.show_composited_layer_borders = 267 web_prefs.show_composited_layer_borders =
268 command_line.HasSwitch(switches::kShowCompositedLayerBorders); 268 command_line.HasSwitch(switches::kShowCompositedLayerBorders);
269 web_prefs.accelerated_compositing_enabled = 269 web_prefs.accelerated_compositing_enabled =
270 command_line.HasSwitch(switches::kEnableAcceleratedCompositing); 270 command_line.HasSwitch(switches::kEnableAcceleratedCompositing);
271 web_prefs.accelerated_2d_canvas_enabled =
272 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas);
271 web_prefs.memory_info_enabled = 273 web_prefs.memory_info_enabled =
272 command_line.HasSwitch(switches::kEnableMemoryInfo); 274 command_line.HasSwitch(switches::kEnableMemoryInfo);
273 // The user stylesheet watcher may not exist in a testing profile. 275 // The user stylesheet watcher may not exist in a testing profile.
274 if (profile->GetUserStyleSheetWatcher()) { 276 if (profile->GetUserStyleSheetWatcher()) {
275 web_prefs.user_style_sheet_enabled = true; 277 web_prefs.user_style_sheet_enabled = true;
276 web_prefs.user_style_sheet_location = 278 web_prefs.user_style_sheet_location =
277 profile->GetUserStyleSheetWatcher()->user_style_sheet(); 279 profile->GetUserStyleSheetWatcher()->user_style_sheet();
278 } else { 280 } else {
279 web_prefs.user_style_sheet_enabled = false; 281 web_prefs.user_style_sheet_enabled = false;
280 } 282 }
(...skipping 14 matching lines...) Expand all
295 } 297 }
296 DCHECK(!web_prefs.default_encoding.empty()); 298 DCHECK(!web_prefs.default_encoding.empty());
297 299
298 if (is_dom_ui) { 300 if (is_dom_ui) {
299 web_prefs.loads_images_automatically = true; 301 web_prefs.loads_images_automatically = true;
300 web_prefs.javascript_enabled = true; 302 web_prefs.javascript_enabled = true;
301 } 303 }
302 304
303 return web_prefs; 305 return web_prefs;
304 } 306 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | chrome/common/chrome_switches.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698