| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" | 
| 6 | 6 | 
| 7 #include <utility> | 7 #include <utility> | 
| 8 | 8 | 
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" | 
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" | 
| 11 #include "base/metrics/stats_counters.h" | 11 #include "base/metrics/stats_counters.h" | 
| 12 #include "base/string16.h" | 12 #include "base/string16.h" | 
| 13 #include "base/string_number_conversions.h" | 13 #include "base/string_number_conversions.h" | 
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" | 
| 15 #include "base/sys_info.h" | 15 #include "base/sys_info.h" | 
| 16 #include "base/time.h" | 16 #include "base/time.h" | 
| 17 #include "base/utf_string_conversions.h" | 17 #include "base/utf_string_conversions.h" | 
|  | 18 #include "cc/switches.h" | 
| 18 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 19 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 
| 19 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 20 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 
| 20 #include "content/browser/browser_plugin/old/old_browser_plugin_host.h" | 21 #include "content/browser/browser_plugin/old/old_browser_plugin_host.h" | 
| 21 #include "content/browser/child_process_security_policy_impl.h" | 22 #include "content/browser/child_process_security_policy_impl.h" | 
| 22 #include "content/browser/debugger/devtools_manager_impl.h" | 23 #include "content/browser/debugger/devtools_manager_impl.h" | 
| 23 #include "content/browser/dom_storage/dom_storage_context_impl.h" | 24 #include "content/browser/dom_storage/dom_storage_context_impl.h" | 
| 24 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 25 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 
| 25 #include "content/browser/download/download_stats.h" | 26 #include "content/browser/download/download_stats.h" | 
| 26 #include "content/browser/download/mhtml_generation_manager.h" | 27 #include "content/browser/download/mhtml_generation_manager.h" | 
| 27 #include "content/browser/download/save_package.h" | 28 #include "content/browser/download/save_package.h" | 
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 676 | 677 | 
| 677   prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( | 678   prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( | 
| 678       switches::kDisableFixedPositionCreatesStackingContext); | 679       switches::kDisableFixedPositionCreatesStackingContext); | 
| 679 | 680 | 
| 680   prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( | 681   prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( | 
| 681       switches::kEnableGestureTapHighlight); | 682       switches::kEnableGestureTapHighlight); | 
| 682 | 683 | 
| 683   prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 684   prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 
| 684 | 685 | 
| 685   prefs.apply_page_scale_factor_in_compositor = | 686   prefs.apply_page_scale_factor_in_compositor = | 
| 686       command_line.HasSwitch(switches::kEnablePinchInCompositor); | 687       command_line.HasSwitch(cc::switches::kEnablePinchInCompositor); | 
| 687 | 688 | 
| 688   content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); | 689   content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); | 
| 689 | 690 | 
| 690   // Disable compositing in guests until we have compositing path implemented | 691   // Disable compositing in guests until we have compositing path implemented | 
| 691   // for guests. | 692   // for guests. | 
| 692   if (rvh->GetProcess()->IsGuest()) { | 693   if (rvh->GetProcess()->IsGuest()) { | 
| 693     prefs.force_compositing_mode = false; | 694     prefs.force_compositing_mode = false; | 
| 694     prefs.accelerated_compositing_enabled = false; | 695     prefs.accelerated_compositing_enabled = false; | 
| 695   } | 696   } | 
| 696 | 697 | 
| (...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3427   } | 3428   } | 
| 3428 } | 3429 } | 
| 3429 | 3430 | 
| 3430 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3431 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 
| 3431   return browser_plugin_guest_.get(); | 3432   return browser_plugin_guest_.get(); | 
| 3432 } | 3433 } | 
| 3433 | 3434 | 
| 3434 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3435 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 
| 3435   return browser_plugin_embedder_.get(); | 3436   return browser_plugin_embedder_.get(); | 
| 3436 } | 3437 } | 
| OLD | NEW | 
|---|