| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 web_prefs.show_fps_counter = | 293 web_prefs.show_fps_counter = |
| 294 command_line.HasSwitch(switches::kShowFPSCounter); | 294 command_line.HasSwitch(switches::kShowFPSCounter); |
| 295 web_prefs.accelerated_compositing_enabled = | 295 web_prefs.accelerated_compositing_enabled = |
| 296 gpu_enabled() && | 296 gpu_enabled() && |
| 297 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 297 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
| 298 web_prefs.force_compositing_mode = | 298 web_prefs.force_compositing_mode = |
| 299 command_line.HasSwitch(switches::kForceCompositingMode); | 299 command_line.HasSwitch(switches::kForceCompositingMode); |
| 300 web_prefs.accelerated_2d_canvas_enabled = | 300 web_prefs.accelerated_2d_canvas_enabled = |
| 301 gpu_enabled() && | 301 gpu_enabled() && |
| 302 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); | 302 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); |
| 303 web_prefs.accelerated_drawing_enabled = |
| 304 gpu_enabled() && |
| 305 command_line.HasSwitch(switches::kEnableAcceleratedDrawing); |
| 303 web_prefs.accelerated_layers_enabled = | 306 web_prefs.accelerated_layers_enabled = |
| 304 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); | 307 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
| 305 web_prefs.composite_to_texture_enabled = | 308 web_prefs.composite_to_texture_enabled = |
| 306 command_line.HasSwitch(switches::kEnableCompositeToTexture); | 309 command_line.HasSwitch(switches::kEnableCompositeToTexture); |
| 307 web_prefs.accelerated_plugins_enabled = | 310 web_prefs.accelerated_plugins_enabled = |
| 308 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); | 311 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); |
| 309 web_prefs.accelerated_video_enabled = | 312 web_prefs.accelerated_video_enabled = |
| 310 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); | 313 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); |
| 311 web_prefs.memory_info_enabled = | 314 web_prefs.memory_info_enabled = |
| 312 command_line.HasSwitch(switches::kEnableMemoryInfo); | 315 command_line.HasSwitch(switches::kEnableMemoryInfo); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 DictionaryPrefUpdate update(profile->GetPrefs(), | 370 DictionaryPrefUpdate update(profile->GetPrefs(), |
| 368 prefs::kWebKitInspectorSettings); | 371 prefs::kWebKitInspectorSettings); |
| 369 DictionaryValue* inspector_settings = update.Get(); | 372 DictionaryValue* inspector_settings = update.Get(); |
| 370 inspector_settings->SetWithoutPathExpansion(key, | 373 inspector_settings->SetWithoutPathExpansion(key, |
| 371 Value::CreateStringValue(value)); | 374 Value::CreateStringValue(value)); |
| 372 } | 375 } |
| 373 | 376 |
| 374 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { | 377 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { |
| 375 profile->GetPrefs()->ClearPref(prefs::kWebKitInspectorSettings); | 378 profile->GetPrefs()->ClearPref(prefs::kWebKitInspectorSettings); |
| 376 } | 379 } |
| OLD | NEW |