| 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); | 666 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); |
| 667 | 667 |
| 668 prefs.deferred_image_decoding_enabled = | 668 prefs.deferred_image_decoding_enabled = |
| 669 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || | 669 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || |
| 670 command_line.HasSwitch(cc::switches::kEnableImplSidePainting); | 670 cc::switches::IsImplSidePaintingEnabled(); |
| 671 | 671 |
| 672 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); | 672 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); |
| 673 | 673 |
| 674 // Disable compositing in guests until we have compositing path implemented | 674 // Disable compositing in guests until we have compositing path implemented |
| 675 // for guests. | 675 // for guests. |
| 676 bool guest_compositing_enabled = command_line.HasSwitch( | 676 bool guest_compositing_enabled = command_line.HasSwitch( |
| 677 switches::kEnableBrowserPluginCompositing); | 677 switches::kEnableBrowserPluginCompositing); |
| 678 if (rvh->GetProcess()->IsGuest() && !guest_compositing_enabled) { | 678 if (rvh->GetProcess()->IsGuest() && !guest_compositing_enabled) { |
| 679 prefs.force_compositing_mode = false; | 679 prefs.force_compositing_mode = false; |
| 680 prefs.accelerated_compositing_enabled = false; | 680 prefs.accelerated_compositing_enabled = false; |
| (...skipping 2867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3548 | 3548 |
| 3549 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { | 3549 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { |
| 3550 return browser_plugin_guest_.get(); | 3550 return browser_plugin_guest_.get(); |
| 3551 } | 3551 } |
| 3552 | 3552 |
| 3553 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const { | 3553 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const { |
| 3554 return browser_plugin_embedder_.get(); | 3554 return browser_plugin_embedder_.get(); |
| 3555 } | 3555 } |
| 3556 | 3556 |
| 3557 } // namespace content | 3557 } // namespace content |
| OLD | NEW |