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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 | 659 |
660 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( | 660 prefs.gesture_tap_highlight_enabled = command_line.HasSwitch( |
661 switches::kEnableGestureTapHighlight); | 661 switches::kEnableGestureTapHighlight); |
662 | 662 |
663 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 663 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); |
664 | 664 |
665 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); | 665 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); |
666 | 666 |
667 prefs.deferred_image_decoding_enabled = | 667 prefs.deferred_image_decoding_enabled = |
668 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || | 668 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || |
669 command_line.HasSwitch(cc::switches::kEnableImplSidePainting); | 669 cc::switches::IsImplSidePaintingEnabled(); |
670 | 670 |
671 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); | 671 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); |
672 | 672 |
673 // Disable compositing in guests until we have compositing path implemented | 673 // Disable compositing in guests until we have compositing path implemented |
674 // for guests. | 674 // for guests. |
675 bool guest_compositing_enabled = command_line.HasSwitch( | 675 bool guest_compositing_enabled = command_line.HasSwitch( |
676 switches::kEnableBrowserPluginCompositing); | 676 switches::kEnableBrowserPluginCompositing); |
677 if (rvh->GetProcess()->IsGuest() && !guest_compositing_enabled) { | 677 if (rvh->GetProcess()->IsGuest() && !guest_compositing_enabled) { |
678 prefs.force_compositing_mode = false; | 678 prefs.force_compositing_mode = false; |
679 prefs.accelerated_compositing_enabled = false; | 679 prefs.accelerated_compositing_enabled = false; |
(...skipping 2863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3543 | 3543 |
3544 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { | 3544 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { |
3545 return browser_plugin_guest_.get(); | 3545 return browser_plugin_guest_.get(); |
3546 } | 3546 } |
3547 | 3547 |
3548 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const { | 3548 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const { |
3549 return browser_plugin_embedder_.get(); | 3549 return browser_plugin_embedder_.get(); |
3550 } | 3550 } |
3551 | 3551 |
3552 } // namespace content | 3552 } // namespace content |
OLD | NEW |