| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 !command_line.HasSwitch(switches::kDisableRemoteFonts); | 266 !command_line.HasSwitch(switches::kDisableRemoteFonts); |
| 267 web_prefs.xss_auditor_enabled = | 267 web_prefs.xss_auditor_enabled = |
| 268 command_line.HasSwitch(switches::kEnableXSSAuditor); | 268 command_line.HasSwitch(switches::kEnableXSSAuditor); |
| 269 web_prefs.application_cache_enabled = | 269 web_prefs.application_cache_enabled = |
| 270 !command_line.HasSwitch(switches::kDisableApplicationCache); | 270 !command_line.HasSwitch(switches::kDisableApplicationCache); |
| 271 | 271 |
| 272 web_prefs.local_storage_enabled = | 272 web_prefs.local_storage_enabled = |
| 273 !command_line.HasSwitch(switches::kDisableLocalStorage); | 273 !command_line.HasSwitch(switches::kDisableLocalStorage); |
| 274 web_prefs.databases_enabled = | 274 web_prefs.databases_enabled = |
| 275 !command_line.HasSwitch(switches::kDisableDatabases); | 275 !command_line.HasSwitch(switches::kDisableDatabases); |
| 276 web_prefs.webaudio_enabled = | |
| 277 command_line.HasSwitch(switches::kEnableWebAudio); | |
| 278 web_prefs.experimental_webgl_enabled = | 276 web_prefs.experimental_webgl_enabled = |
| 279 gpu_enabled() && | 277 gpu_enabled() && |
| 280 !command_line.HasSwitch(switches::kDisable3DAPIs) && | 278 !command_line.HasSwitch(switches::kDisable3DAPIs) && |
| 281 !command_line.HasSwitch(switches::kDisableExperimentalWebGL); | 279 !command_line.HasSwitch(switches::kDisableExperimentalWebGL); |
| 282 web_prefs.site_specific_quirks_enabled = | 280 web_prefs.site_specific_quirks_enabled = |
| 283 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); | 281 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); |
| 284 web_prefs.allow_file_access_from_file_urls = | 282 web_prefs.allow_file_access_from_file_urls = |
| 285 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); | 283 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); |
| 286 web_prefs.show_composited_layer_borders = | 284 web_prefs.show_composited_layer_borders = |
| 287 command_line.HasSwitch(switches::kShowCompositedLayerBorders); | 285 command_line.HasSwitch(switches::kShowCompositedLayerBorders); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 inspector_settings->SetWithoutPathExpansion(key, | 342 inspector_settings->SetWithoutPathExpansion(key, |
| 345 Value::CreateStringValue(value)); | 343 Value::CreateStringValue(value)); |
| 346 } | 344 } |
| 347 | 345 |
| 348 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { | 346 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { |
| 349 DictionaryValue* inspector_settings = | 347 DictionaryValue* inspector_settings = |
| 350 profile->GetPrefs()->GetMutableDictionary( | 348 profile->GetPrefs()->GetMutableDictionary( |
| 351 prefs::kWebKitInspectorSettings); | 349 prefs::kWebKitInspectorSettings); |
| 352 inspector_settings->Clear(); | 350 inspector_settings->Clear(); |
| 353 } | 351 } |
| OLD | NEW |