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