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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 web_prefs.experimental_webgl_enabled = | 278 web_prefs.experimental_webgl_enabled = |
279 command_line.HasSwitch(switches::kEnableExperimentalWebGL); | 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::kEnableAcceleratedCompositing); | 287 command_line.HasSwitch(switches::kEnableAcceleratedCompositing); |
288 web_prefs.accelerated_2d_canvas_enabled = | 288 web_prefs.accelerated_2d_canvas_enabled = false; |
289 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); | |
290 web_prefs.memory_info_enabled = | 289 web_prefs.memory_info_enabled = |
291 command_line.HasSwitch(switches::kEnableMemoryInfo); | 290 command_line.HasSwitch(switches::kEnableMemoryInfo); |
292 web_prefs.hyperlink_auditing_enabled = | 291 web_prefs.hyperlink_auditing_enabled = |
293 !command_line.HasSwitch(switches::kNoPings); | 292 !command_line.HasSwitch(switches::kNoPings); |
294 // The user stylesheet watcher may not exist in a testing profile. | 293 // The user stylesheet watcher may not exist in a testing profile. |
295 if (profile->GetUserStyleSheetWatcher()) { | 294 if (profile->GetUserStyleSheetWatcher()) { |
296 web_prefs.user_style_sheet_enabled = true; | 295 web_prefs.user_style_sheet_enabled = true; |
297 web_prefs.user_style_sheet_location = | 296 web_prefs.user_style_sheet_location = |
298 profile->GetUserStyleSheetWatcher()->user_style_sheet(); | 297 profile->GetUserStyleSheetWatcher()->user_style_sheet(); |
299 } else { | 298 } else { |
(...skipping 16 matching lines...) Expand all Loading... |
316 } | 315 } |
317 DCHECK(!web_prefs.default_encoding.empty()); | 316 DCHECK(!web_prefs.default_encoding.empty()); |
318 | 317 |
319 if (is_dom_ui) { | 318 if (is_dom_ui) { |
320 web_prefs.loads_images_automatically = true; | 319 web_prefs.loads_images_automatically = true; |
321 web_prefs.javascript_enabled = true; | 320 web_prefs.javascript_enabled = true; |
322 } | 321 } |
323 | 322 |
324 return web_prefs; | 323 return web_prefs; |
325 } | 324 } |
OLD | NEW |