| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 command_line.HasSwitch(switches::kShowCompositedLayerTree); | 312 command_line.HasSwitch(switches::kShowCompositedLayerTree); |
| 313 web_prefs.show_fps_counter = | 313 web_prefs.show_fps_counter = |
| 314 command_line.HasSwitch(switches::kShowFPSCounter); | 314 command_line.HasSwitch(switches::kShowFPSCounter); |
| 315 web_prefs.accelerated_compositing_enabled = | 315 web_prefs.accelerated_compositing_enabled = |
| 316 gpu_enabled() && | 316 gpu_enabled() && |
| 317 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 317 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
| 318 web_prefs.force_compositing_mode = | 318 web_prefs.force_compositing_mode = |
| 319 command_line.HasSwitch(switches::kForceCompositingMode); | 319 command_line.HasSwitch(switches::kForceCompositingMode); |
| 320 web_prefs.accelerated_2d_canvas_enabled = | 320 web_prefs.accelerated_2d_canvas_enabled = |
| 321 gpu_enabled() && | 321 gpu_enabled() && |
| 322 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); | 322 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); |
| 323 web_prefs.accelerated_drawing_enabled = | 323 web_prefs.accelerated_drawing_enabled = |
| 324 gpu_enabled() && | 324 gpu_enabled() && |
| 325 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); | 325 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); |
| 326 web_prefs.accelerated_layers_enabled = | 326 web_prefs.accelerated_layers_enabled = |
| 327 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); | 327 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
| 328 web_prefs.composite_to_texture_enabled = | 328 web_prefs.composite_to_texture_enabled = |
| 329 command_line.HasSwitch(switches::kEnableCompositeToTexture); | 329 command_line.HasSwitch(switches::kEnableCompositeToTexture); |
| 330 web_prefs.accelerated_plugins_enabled = | 330 web_prefs.accelerated_plugins_enabled = |
| 331 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); | 331 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); |
| 332 web_prefs.accelerated_video_enabled = | 332 web_prefs.accelerated_video_enabled = |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 DictionaryPrefUpdate update(profile->GetPrefs(), | 394 DictionaryPrefUpdate update(profile->GetPrefs(), |
| 395 prefs::kWebKitInspectorSettings); | 395 prefs::kWebKitInspectorSettings); |
| 396 DictionaryValue* inspector_settings = update.Get(); | 396 DictionaryValue* inspector_settings = update.Get(); |
| 397 inspector_settings->SetWithoutPathExpansion(key, | 397 inspector_settings->SetWithoutPathExpansion(key, |
| 398 Value::CreateStringValue(value)); | 398 Value::CreateStringValue(value)); |
| 399 } | 399 } |
| 400 | 400 |
| 401 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { | 401 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { |
| 402 profile->GetPrefs()->ClearPref(prefs::kWebKitInspectorSettings); | 402 profile->GetPrefs()->ClearPref(prefs::kWebKitInspectorSettings); |
| 403 } | 403 } |
| OLD | NEW |