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); |
276 web_prefs.experimental_webgl_enabled = | 278 web_prefs.experimental_webgl_enabled = |
277 gpu_enabled() && | 279 gpu_enabled() && |
278 !command_line.HasSwitch(switches::kDisable3DAPIs) && | 280 !command_line.HasSwitch(switches::kDisable3DAPIs) && |
279 !command_line.HasSwitch(switches::kDisableExperimentalWebGL); | 281 !command_line.HasSwitch(switches::kDisableExperimentalWebGL); |
280 web_prefs.site_specific_quirks_enabled = | 282 web_prefs.site_specific_quirks_enabled = |
281 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); | 283 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); |
282 web_prefs.allow_file_access_from_file_urls = | 284 web_prefs.allow_file_access_from_file_urls = |
283 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); | 285 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); |
284 web_prefs.show_composited_layer_borders = | 286 web_prefs.show_composited_layer_borders = |
285 command_line.HasSwitch(switches::kShowCompositedLayerBorders); | 287 command_line.HasSwitch(switches::kShowCompositedLayerBorders); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 inspector_settings->SetWithoutPathExpansion(key, | 342 inspector_settings->SetWithoutPathExpansion(key, |
341 Value::CreateStringValue(value)); | 343 Value::CreateStringValue(value)); |
342 } | 344 } |
343 | 345 |
344 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { | 346 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { |
345 DictionaryValue* inspector_settings = | 347 DictionaryValue* inspector_settings = |
346 profile->GetPrefs()->GetMutableDictionary( | 348 profile->GetPrefs()->GetMutableDictionary( |
347 prefs::kWebKitInspectorSettings); | 349 prefs::kWebKitInspectorSettings); |
348 inspector_settings->Clear(); | 350 inspector_settings->Clear(); |
349 } | 351 } |
OLD | NEW |