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

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

Issue 8822025: Add --enable-accelerated-filters flag to Chrome. Note that most of this is cargo cult, based on ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | content/common/view_messages.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/background_contents_service.h" 10 #include "chrome/browser/background/background_contents_service.h"
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 web_prefs.fixed_position_compositing_enabled = 453 web_prefs.fixed_position_compositing_enabled =
454 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition); 454 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition);
455 web_prefs.allow_webui_compositing = 455 web_prefs.allow_webui_compositing =
456 command_line.HasSwitch(switches::kAllowWebUICompositing); 456 command_line.HasSwitch(switches::kAllowWebUICompositing);
457 web_prefs.accelerated_2d_canvas_enabled = 457 web_prefs.accelerated_2d_canvas_enabled =
458 GpuProcessHost::gpu_enabled() && 458 GpuProcessHost::gpu_enabled() &&
459 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); 459 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas);
460 web_prefs.accelerated_drawing_enabled = 460 web_prefs.accelerated_drawing_enabled =
461 GpuProcessHost::gpu_enabled() && 461 GpuProcessHost::gpu_enabled() &&
462 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); 462 command_line.HasSwitch(switches::kEnableAcceleratedDrawing);
463 web_prefs.accelerated_filters_enabled =
464 GpuProcessHost::gpu_enabled() &&
465 command_line.HasSwitch(switches::kEnableAcceleratedFilters);
463 web_prefs.accelerated_layers_enabled = 466 web_prefs.accelerated_layers_enabled =
464 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); 467 !command_line.HasSwitch(switches::kDisableAcceleratedLayers);
465 web_prefs.composite_to_texture_enabled = 468 web_prefs.composite_to_texture_enabled =
466 command_line.HasSwitch(switches::kEnableCompositeToTexture); 469 command_line.HasSwitch(switches::kEnableCompositeToTexture);
467 web_prefs.accelerated_plugins_enabled = 470 web_prefs.accelerated_plugins_enabled =
468 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); 471 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins);
469 web_prefs.accelerated_video_enabled = 472 web_prefs.accelerated_video_enabled =
470 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); 473 !command_line.HasSwitch(switches::kDisableAcceleratedVideo);
471 web_prefs.memory_info_enabled = 474 web_prefs.memory_info_enabled =
472 command_line.HasSwitch(switches::kEnableMemoryInfo); 475 command_line.HasSwitch(switches::kEnableMemoryInfo);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 DictionaryValue* inspector_settings = update.Get(); 581 DictionaryValue* inspector_settings = update.Get();
579 inspector_settings->SetWithoutPathExpansion(key, 582 inspector_settings->SetWithoutPathExpansion(key,
580 Value::CreateStringValue(value)); 583 Value::CreateStringValue(value));
581 } 584 }
582 585
583 void RenderViewHostDelegateHelper::ClearInspectorSettings( 586 void RenderViewHostDelegateHelper::ClearInspectorSettings(
584 content::BrowserContext* browser_context) { 587 content::BrowserContext* browser_context) {
585 Profile::FromBrowserContext(browser_context)->GetPrefs()-> 588 Profile::FromBrowserContext(browser_context)->GetPrefs()->
586 ClearPref(prefs::kWebKitInspectorSettings); 589 ClearPref(prefs::kWebKitInspectorSettings);
587 } 590 }
OLDNEW
« no previous file with comments | « no previous file | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698