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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); | 645 !command_line.HasSwitch(cc::switches::kDisableThreadedAnimation); |
646 | 646 |
647 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( | 647 prefs.fixed_position_creates_stacking_context = !command_line.HasSwitch( |
648 switches::kDisableFixedPositionCreatesStackingContext); | 648 switches::kDisableFixedPositionCreatesStackingContext); |
649 | 649 |
650 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( | 650 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( |
651 switches::kEnableGestureTapHighlight); | 651 switches::kEnableGestureTapHighlight); |
652 | 652 |
653 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 653 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); |
654 | 654 |
| 655 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); |
| 656 |
655 prefs.deferred_image_decoding_enabled = | 657 prefs.deferred_image_decoding_enabled = |
656 command_line.HasSwitch(switches::kEnableDeferredImageDecoding); | 658 command_line.HasSwitch(switches::kEnableDeferredImageDecoding); |
657 | 659 |
658 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); | 660 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); |
659 | 661 |
660 // Disable compositing in guests until we have compositing path implemented | 662 // Disable compositing in guests until we have compositing path implemented |
661 // for guests. | 663 // for guests. |
662 bool guest_compositing_enabled = command_line.HasSwitch( | 664 bool guest_compositing_enabled = command_line.HasSwitch( |
663 switches::kEnableBrowserPluginCompositing); | 665 switches::kEnableBrowserPluginCompositing); |
664 if (rvh->GetProcess()->IsGuest() && !guest_compositing_enabled) { | 666 if (rvh->GetProcess()->IsGuest() && !guest_compositing_enabled) { |
(...skipping 2731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3396 | 3398 |
3397 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { | 3399 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() { |
3398 return browser_plugin_guest_.get(); | 3400 return browser_plugin_guest_.get(); |
3399 } | 3401 } |
3400 | 3402 |
3401 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { | 3403 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() { |
3402 return browser_plugin_embedder_.get(); | 3404 return browser_plugin_embedder_.get(); |
3403 } | 3405 } |
3404 | 3406 |
3405 } // namespace content | 3407 } // namespace content |
OLD | NEW |