Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 12547016: Enable browser plugin compositing by default, but add a flag to disable it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport); 625 prefs.viewport_enabled = command_line.HasSwitch(switches::kEnableViewport);
626 626
627 prefs.deferred_image_decoding_enabled = 627 prefs.deferred_image_decoding_enabled =
628 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || 628 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) ||
629 cc::switches::IsImplSidePaintingEnabled(); 629 cc::switches::IsImplSidePaintingEnabled();
630 630
631 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); 631 GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs);
632 632
633 // Disable compositing in guests until we have compositing path implemented 633 // Disable compositing in guests until we have compositing path implemented
634 // for guests. 634 // for guests.
635 bool guest_compositing_enabled = command_line.HasSwitch( 635 bool guest_compositing_enabled = !command_line.HasSwitch(
636 switches::kEnableBrowserPluginCompositing); 636 switches::kDisableBrowserPluginCompositing);
637 if (rvh->GetProcess()->IsGuest() && !guest_compositing_enabled) { 637 if (rvh->GetProcess()->IsGuest() && !guest_compositing_enabled) {
638 prefs.force_compositing_mode = false; 638 prefs.force_compositing_mode = false;
639 prefs.accelerated_compositing_enabled = false; 639 prefs.accelerated_compositing_enabled = false;
640 } 640 }
641 641
642 #if defined(OS_LINUX) && !defined(USE_AURA) 642 #if defined(OS_LINUX) && !defined(USE_AURA)
643 // Temporary fix for Linux non-Aura capturing. http://crbug.com/174957 643 // Temporary fix for Linux non-Aura capturing. http://crbug.com/174957
644 WebContentsImpl* web_contents = 644 WebContentsImpl* web_contents =
645 static_cast<WebContentsImpl*>(WebContents::FromRenderViewHost(rvh)); 645 static_cast<WebContentsImpl*>(WebContents::FromRenderViewHost(rvh));
646 if (web_contents && web_contents->capturer_count_ > 0) { 646 if (web_contents && web_contents->capturer_count_ > 0) {
(...skipping 2854 matching lines...) Expand 10 before | Expand all | Expand 10 after
3501 } 3501 }
3502 3502
3503 BrowserPluginGuestManager* 3503 BrowserPluginGuestManager*
3504 WebContentsImpl::GetBrowserPluginGuestManager() const { 3504 WebContentsImpl::GetBrowserPluginGuestManager() const {
3505 return static_cast<BrowserPluginGuestManager*>( 3505 return static_cast<BrowserPluginGuestManager*>(
3506 GetBrowserContext()->GetUserData( 3506 GetBrowserContext()->GetUserData(
3507 browser_plugin::kBrowserPluginGuestManagerKeyName)); 3507 browser_plugin::kBrowserPluginGuestManagerKeyName));
3508 } 3508 }
3509 3509
3510 } // namespace content 3510 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_guest.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698