| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/background_contents_service.h" | 10 #include "chrome/browser/background_contents_service.h" |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 web_prefs.xss_auditor_enabled = | 269 web_prefs.xss_auditor_enabled = |
| 270 command_line.HasSwitch(switches::kEnableXSSAuditor); | 270 command_line.HasSwitch(switches::kEnableXSSAuditor); |
| 271 web_prefs.application_cache_enabled = | 271 web_prefs.application_cache_enabled = |
| 272 !command_line.HasSwitch(switches::kDisableApplicationCache); | 272 !command_line.HasSwitch(switches::kDisableApplicationCache); |
| 273 | 273 |
| 274 web_prefs.local_storage_enabled = | 274 web_prefs.local_storage_enabled = |
| 275 !command_line.HasSwitch(switches::kDisableLocalStorage); | 275 !command_line.HasSwitch(switches::kDisableLocalStorage); |
| 276 web_prefs.databases_enabled = | 276 web_prefs.databases_enabled = |
| 277 !command_line.HasSwitch(switches::kDisableDatabases); | 277 !command_line.HasSwitch(switches::kDisableDatabases); |
| 278 web_prefs.experimental_webgl_enabled = | 278 web_prefs.experimental_webgl_enabled = |
| 279 !command_line.HasSwitch(switches::kDisableExperimentalWebGL); | 279 command_line.HasSwitch(switches::kEnableExperimentalWebGL); |
| 280 web_prefs.site_specific_quirks_enabled = | 280 web_prefs.site_specific_quirks_enabled = |
| 281 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); | 281 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); |
| 282 web_prefs.allow_file_access_from_file_urls = | 282 web_prefs.allow_file_access_from_file_urls = |
| 283 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); | 283 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); |
| 284 web_prefs.show_composited_layer_borders = | 284 web_prefs.show_composited_layer_borders = |
| 285 command_line.HasSwitch(switches::kShowCompositedLayerBorders); | 285 command_line.HasSwitch(switches::kShowCompositedLayerBorders); |
| 286 web_prefs.accelerated_compositing_enabled = | 286 web_prefs.accelerated_compositing_enabled = |
| 287 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); | 287 command_line.HasSwitch(switches::kEnableAcceleratedCompositing); |
| 288 web_prefs.accelerated_2d_canvas_enabled = | 288 web_prefs.accelerated_2d_canvas_enabled = |
| 289 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); | 289 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); |
| 290 web_prefs.memory_info_enabled = | 290 web_prefs.memory_info_enabled = |
| 291 command_line.HasSwitch(switches::kEnableMemoryInfo); | 291 command_line.HasSwitch(switches::kEnableMemoryInfo); |
| 292 web_prefs.hyperlink_auditing_enabled = | 292 web_prefs.hyperlink_auditing_enabled = |
| 293 !command_line.HasSwitch(switches::kNoPings); | 293 !command_line.HasSwitch(switches::kNoPings); |
| 294 // The user stylesheet watcher may not exist in a testing profile. | 294 // The user stylesheet watcher may not exist in a testing profile. |
| 295 if (profile->GetUserStyleSheetWatcher()) { | 295 if (profile->GetUserStyleSheetWatcher()) { |
| 296 web_prefs.user_style_sheet_enabled = true; | 296 web_prefs.user_style_sheet_enabled = true; |
| 297 web_prefs.user_style_sheet_location = | 297 web_prefs.user_style_sheet_location = |
| (...skipping 18 matching lines...) Expand all Loading... |
| 316 } | 316 } |
| 317 DCHECK(!web_prefs.default_encoding.empty()); | 317 DCHECK(!web_prefs.default_encoding.empty()); |
| 318 | 318 |
| 319 if (is_dom_ui) { | 319 if (is_dom_ui) { |
| 320 web_prefs.loads_images_automatically = true; | 320 web_prefs.loads_images_automatically = true; |
| 321 web_prefs.javascript_enabled = true; | 321 web_prefs.javascript_enabled = true; |
| 322 } | 322 } |
| 323 | 323 |
| 324 return web_prefs; | 324 return web_prefs; |
| 325 } | 325 } |
| OLD | NEW |