| 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" |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 } | 656 } |
| 657 | 657 |
| 658 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( | 658 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( |
| 659 switches::kDisableFixedPositionCreatesStackingContext); | 659 switches::kDisableFixedPositionCreatesStackingContext); |
| 660 | 660 |
| 661 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( | 661 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( |
| 662 switches::kEnableGestureTapHighlight); | 662 switches::kEnableGestureTapHighlight); |
| 663 | 663 |
| 664 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 664 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); |
| 665 | 665 |
| 666 prefs.apply_page_scale_factor_in_compositor = |
| 667 GpuProcessHost::gpu_enabled() && |
| 668 command_line.HasSwitch(switches::kEnablePinchInCompositor); |
| 669 |
| 666 content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); | 670 content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); |
| 667 | 671 |
| 668 return prefs; | 672 return prefs; |
| 669 } | 673 } |
| 670 | 674 |
| 671 RenderViewHostManager* WebContentsImpl::GetRenderManagerForTesting() { | 675 RenderViewHostManager* WebContentsImpl::GetRenderManagerForTesting() { |
| 672 return &render_manager_; | 676 return &render_manager_; |
| 673 } | 677 } |
| 674 | 678 |
| 675 bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host, | 679 bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host, |
| (...skipping 2690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3366 } | 3370 } |
| 3367 } | 3371 } |
| 3368 | 3372 |
| 3369 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3373 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
| 3370 return browser_plugin_guest_.get(); | 3374 return browser_plugin_guest_.get(); |
| 3371 } | 3375 } |
| 3372 | 3376 |
| 3373 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3377 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
| 3374 return browser_plugin_embedder_.get(); | 3378 return browser_plugin_embedder_.get(); |
| 3375 } | 3379 } |
| OLD | NEW |