| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); | 287 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); |
| 288 web_prefs.show_composited_layer_borders = | 288 web_prefs.show_composited_layer_borders = |
| 289 command_line.HasSwitch(switches::kShowCompositedLayerBorders); | 289 command_line.HasSwitch(switches::kShowCompositedLayerBorders); |
| 290 web_prefs.accelerated_compositing_enabled = | 290 web_prefs.accelerated_compositing_enabled = |
| 291 gpu_enabled() && | 291 gpu_enabled() && |
| 292 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 292 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); |
| 293 web_prefs.accelerated_2d_canvas_enabled = | 293 web_prefs.accelerated_2d_canvas_enabled = |
| 294 gpu_enabled() && | 294 gpu_enabled() && |
| 295 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); | 295 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); |
| 296 web_prefs.accelerated_layers_enabled = | 296 web_prefs.accelerated_layers_enabled = |
| 297 command_line.HasSwitch(switches::kEnableAcceleratedLayers); | 297 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); |
| 298 web_prefs.accelerated_plugins_enabled = | 298 web_prefs.accelerated_plugins_enabled = |
| 299 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); | 299 command_line.HasSwitch(switches::kEnableAcceleratedPlugins); |
| 300 web_prefs.accelerated_video_enabled = | 300 web_prefs.accelerated_video_enabled = |
| 301 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); | 301 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); |
| 302 web_prefs.memory_info_enabled = | 302 web_prefs.memory_info_enabled = |
| 303 command_line.HasSwitch(switches::kEnableMemoryInfo); | 303 command_line.HasSwitch(switches::kEnableMemoryInfo); |
| 304 web_prefs.hyperlink_auditing_enabled = | 304 web_prefs.hyperlink_auditing_enabled = |
| 305 !command_line.HasSwitch(switches::kNoPings); | 305 !command_line.HasSwitch(switches::kNoPings); |
| 306 web_prefs.interactive_form_validation_enabled = | 306 web_prefs.interactive_form_validation_enabled = |
| 307 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); | 307 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 inspector_settings->SetWithoutPathExpansion(key, | 346 inspector_settings->SetWithoutPathExpansion(key, |
| 347 Value::CreateStringValue(value)); | 347 Value::CreateStringValue(value)); |
| 348 } | 348 } |
| 349 | 349 |
| 350 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { | 350 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { |
| 351 DictionaryValue* inspector_settings = | 351 DictionaryValue* inspector_settings = |
| 352 profile->GetPrefs()->GetMutableDictionary( | 352 profile->GetPrefs()->GetMutableDictionary( |
| 353 prefs::kWebKitInspectorSettings); | 353 prefs::kWebKitInspectorSettings); |
| 354 inspector_settings->Clear(); | 354 inspector_settings->Clear(); |
| 355 } | 355 } |
| OLD | NEW |