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

Unified Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 584713002: Browser Plugin: Remove dependency on NPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_content_window
Patch Set: Updated histograms.xml Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_widget_host_view_guest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index fb68070899d22ca5413bd1a08a920edd18f3d1be..924d7035eae126a20d3759674123b5e0e6a826df 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -367,7 +367,15 @@ void RenderWidgetHostViewGuest::CopyFromCompositingSurface(
}
void RenderWidgetHostViewGuest::SetBackgroundOpaque(bool opaque) {
- platform_view_->SetBackgroundOpaque(opaque);
+ // Content embedders can toggle opaque backgrounds through this API.
+ // We plumb the value here so that BrowserPlugin updates its compositing
+ // state in response to this change. We also want to preserve this flag
+ // after recovering from a crash so we let BrowserPluginGuest store it.
+ if (!guest_)
+ return;
+ RenderWidgetHostViewBase::SetBackgroundOpaque(opaque);
+ host_->SetBackgroundOpaque(opaque);
+ guest_->SetContentsOpaque(opaque);
}
bool RenderWidgetHostViewGuest::LockMouse() {
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/common/browser_plugin/browser_plugin_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698