| OLD | NEW |
| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 command_line.HasSwitch(switches::kShowCompositedLayerTree); | 438 command_line.HasSwitch(switches::kShowCompositedLayerTree); |
| 439 web_prefs.show_fps_counter = | 439 web_prefs.show_fps_counter = |
| 440 command_line.HasSwitch(switches::kShowFPSCounter); | 440 command_line.HasSwitch(switches::kShowFPSCounter); |
| 441 web_prefs.accelerated_compositing_enabled = | 441 web_prefs.accelerated_compositing_enabled = |
| 442 GpuProcessHost::gpu_enabled() && | 442 GpuProcessHost::gpu_enabled() && |
| 443 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 443 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
| 444 web_prefs.threaded_compositing_enabled = | 444 web_prefs.threaded_compositing_enabled = |
| 445 command_line.HasSwitch(switches::kEnableThreadedCompositing); | 445 command_line.HasSwitch(switches::kEnableThreadedCompositing); |
| 446 web_prefs.force_compositing_mode = | 446 web_prefs.force_compositing_mode = |
| 447 command_line.HasSwitch(switches::kForceCompositingMode); | 447 command_line.HasSwitch(switches::kForceCompositingMode); |
| 448 web_prefs.fixed_position_compositing_enabled = |
| 449 command_line.HasSwitch(switches::kEnableCompositingForFixedPosition); |
| 448 web_prefs.allow_webui_compositing = | 450 web_prefs.allow_webui_compositing = |
| 449 command_line.HasSwitch(switches::kAllowWebUICompositing); | 451 command_line.HasSwitch(switches::kAllowWebUICompositing); |
| 450 web_prefs.accelerated_2d_canvas_enabled = | 452 web_prefs.accelerated_2d_canvas_enabled = |
| 451 GpuProcessHost::gpu_enabled() && | 453 GpuProcessHost::gpu_enabled() && |
| 452 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); | 454 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); |
| 453 web_prefs.accelerated_drawing_enabled = | 455 web_prefs.accelerated_drawing_enabled = |
| 454 GpuProcessHost::gpu_enabled() && | 456 GpuProcessHost::gpu_enabled() && |
| 455 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); | 457 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); |
| 456 web_prefs.accelerated_layers_enabled = | 458 web_prefs.accelerated_layers_enabled = |
| 457 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); | 459 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 DictionaryValue* inspector_settings = update.Get(); | 547 DictionaryValue* inspector_settings = update.Get(); |
| 546 inspector_settings->SetWithoutPathExpansion(key, | 548 inspector_settings->SetWithoutPathExpansion(key, |
| 547 Value::CreateStringValue(value)); | 549 Value::CreateStringValue(value)); |
| 548 } | 550 } |
| 549 | 551 |
| 550 void RenderViewHostDelegateHelper::ClearInspectorSettings( | 552 void RenderViewHostDelegateHelper::ClearInspectorSettings( |
| 551 content::BrowserContext* browser_context) { | 553 content::BrowserContext* browser_context) { |
| 552 Profile::FromBrowserContext(browser_context)->GetPrefs()-> | 554 Profile::FromBrowserContext(browser_context)->GetPrefs()-> |
| 553 ClearPref(prefs::kWebKitInspectorSettings); | 555 ClearPref(prefs::kWebKitInspectorSettings); |
| 554 } | 556 } |
| OLD | NEW |