| 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 command_line.HasSwitch(switches::kShowCompositedLayerBorders); | 396 command_line.HasSwitch(switches::kShowCompositedLayerBorders); |
| 397 web_prefs.show_composited_layer_tree = | 397 web_prefs.show_composited_layer_tree = |
| 398 command_line.HasSwitch(switches::kShowCompositedLayerTree); | 398 command_line.HasSwitch(switches::kShowCompositedLayerTree); |
| 399 web_prefs.show_fps_counter = | 399 web_prefs.show_fps_counter = |
| 400 command_line.HasSwitch(switches::kShowFPSCounter); | 400 command_line.HasSwitch(switches::kShowFPSCounter); |
| 401 web_prefs.accelerated_compositing_enabled = | 401 web_prefs.accelerated_compositing_enabled = |
| 402 GpuProcessHost::gpu_enabled() && | 402 GpuProcessHost::gpu_enabled() && |
| 403 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 403 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
| 404 web_prefs.force_compositing_mode = | 404 web_prefs.force_compositing_mode = |
| 405 command_line.HasSwitch(switches::kForceCompositingMode); | 405 command_line.HasSwitch(switches::kForceCompositingMode); |
| 406 web_prefs.allow_webui_compositing = |
| 407 command_line.HasSwitch(switches::kAllowWebUICompositing); |
| 406 web_prefs.accelerated_2d_canvas_enabled = | 408 web_prefs.accelerated_2d_canvas_enabled = |
| 407 GpuProcessHost::gpu_enabled() && | 409 GpuProcessHost::gpu_enabled() && |
| 408 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); | 410 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); |
| 409 web_prefs.accelerated_drawing_enabled = | 411 web_prefs.accelerated_drawing_enabled = |
| 410 GpuProcessHost::gpu_enabled() && | 412 GpuProcessHost::gpu_enabled() && |
| 411 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); | 413 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); |
| 412 web_prefs.accelerated_layers_enabled = | 414 web_prefs.accelerated_layers_enabled = |
| 413 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); | 415 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
| 414 web_prefs.composite_to_texture_enabled = | 416 web_prefs.composite_to_texture_enabled = |
| 415 command_line.HasSwitch(switches::kEnableCompositeToTexture); | 417 command_line.HasSwitch(switches::kEnableCompositeToTexture); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 DictionaryValue* inspector_settings = update.Get(); | 491 DictionaryValue* inspector_settings = update.Get(); |
| 490 inspector_settings->SetWithoutPathExpansion(key, | 492 inspector_settings->SetWithoutPathExpansion(key, |
| 491 Value::CreateStringValue(value)); | 493 Value::CreateStringValue(value)); |
| 492 } | 494 } |
| 493 | 495 |
| 494 void RenderViewHostDelegateHelper::ClearInspectorSettings( | 496 void RenderViewHostDelegateHelper::ClearInspectorSettings( |
| 495 content::BrowserContext* browser_context) { | 497 content::BrowserContext* browser_context) { |
| 496 Profile::FromBrowserContext(browser_context)->GetPrefs()-> | 498 Profile::FromBrowserContext(browser_context)->GetPrefs()-> |
| 497 ClearPref(prefs::kWebKitInspectorSettings); | 499 ClearPref(prefs::kWebKitInspectorSettings); |
| 498 } | 500 } |
| OLD | NEW |