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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 } | 666 } |
667 | 667 |
668 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( | 668 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( |
669 switches::kDisableFixedPositionCreatesStackingContext); | 669 switches::kDisableFixedPositionCreatesStackingContext); |
670 | 670 |
671 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( | 671 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( |
672 switches::kEnableGestureTapHighlight); | 672 switches::kEnableGestureTapHighlight); |
673 | 673 |
674 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 674 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); |
675 | 675 |
| 676 prefs.apply_page_scale_factor_in_compositor = |
| 677 GpuProcessHost::gpu_enabled() && |
| 678 command_line.HasSwitch(switches::kEnablePinchInCompositor); |
| 679 |
676 content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); | 680 content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); |
677 | 681 |
678 return prefs; | 682 return prefs; |
679 } | 683 } |
680 | 684 |
681 RenderViewHostManager* WebContentsImpl::GetRenderManagerForTesting() { | 685 RenderViewHostManager* WebContentsImpl::GetRenderManagerForTesting() { |
682 return &render_manager_; | 686 return &render_manager_; |
683 } | 687 } |
684 | 688 |
685 bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host, | 689 bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host, |
(...skipping 2707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3393 } | 3397 } |
3394 } | 3398 } |
3395 | 3399 |
3396 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3400 content::BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
3397 return browser_plugin_guest_.get(); | 3401 return browser_plugin_guest_.get(); |
3398 } | 3402 } |
3399 | 3403 |
3400 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3404 content::BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
3401 return browser_plugin_embedder_.get(); | 3405 return browser_plugin_embedder_.get(); |
3402 } | 3406 } |
OLD | NEW |