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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); | 434 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); |
435 web_prefs.show_composited_layer_borders = | 435 web_prefs.show_composited_layer_borders = |
436 command_line.HasSwitch(switches::kShowCompositedLayerBorders); | 436 command_line.HasSwitch(switches::kShowCompositedLayerBorders); |
437 web_prefs.show_composited_layer_tree = | 437 web_prefs.show_composited_layer_tree = |
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 = |
| 445 command_line.HasSwitch(switches::kEnableThreadedCompositing); |
444 web_prefs.force_compositing_mode = | 446 web_prefs.force_compositing_mode = |
445 command_line.HasSwitch(switches::kForceCompositingMode); | 447 command_line.HasSwitch(switches::kForceCompositingMode); |
446 web_prefs.allow_webui_compositing = | 448 web_prefs.allow_webui_compositing = |
447 command_line.HasSwitch(switches::kAllowWebUICompositing); | 449 command_line.HasSwitch(switches::kAllowWebUICompositing); |
448 web_prefs.accelerated_2d_canvas_enabled = | 450 web_prefs.accelerated_2d_canvas_enabled = |
449 GpuProcessHost::gpu_enabled() && | 451 GpuProcessHost::gpu_enabled() && |
450 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); | 452 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); |
451 web_prefs.accelerated_drawing_enabled = | 453 web_prefs.accelerated_drawing_enabled = |
452 GpuProcessHost::gpu_enabled() && | 454 GpuProcessHost::gpu_enabled() && |
453 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); | 455 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 DictionaryValue* inspector_settings = update.Get(); | 545 DictionaryValue* inspector_settings = update.Get(); |
544 inspector_settings->SetWithoutPathExpansion(key, | 546 inspector_settings->SetWithoutPathExpansion(key, |
545 Value::CreateStringValue(value)); | 547 Value::CreateStringValue(value)); |
546 } | 548 } |
547 | 549 |
548 void RenderViewHostDelegateHelper::ClearInspectorSettings( | 550 void RenderViewHostDelegateHelper::ClearInspectorSettings( |
549 content::BrowserContext* browser_context) { | 551 content::BrowserContext* browser_context) { |
550 Profile::FromBrowserContext(browser_context)->GetPrefs()-> | 552 Profile::FromBrowserContext(browser_context)->GetPrefs()-> |
551 ClearPref(prefs::kWebKitInspectorSettings); | 553 ClearPref(prefs::kWebKitInspectorSettings); |
552 } | 554 } |
OLD | NEW |