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

Unified Diff: content/renderer/render_view_impl.cc

Issue 1565893004: Sets a transparent background for out-of-process subframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile Created 4 years, 10 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
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 3f7c05a8bb21ae39e8c5d897bd46afed27f941f2..4278f55ebd838195a20558483194a50a5d5d1e5f 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -144,6 +144,7 @@
#include "third_party/WebKit/public/web/WebFormElement.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebFrameContentDumper.h"
+#include "third_party/WebKit/public/web/WebFrameWidget.h"
#include "third_party/WebKit/public/web/WebHistoryItem.h"
#include "third_party/WebKit/public/web/WebHitTestResult.h"
#include "third_party/WebKit/public/web/WebInputElement.h"
@@ -1761,7 +1762,7 @@ void RenderViewImpl::FrameDidStopLoading(WebFrame* frame) {
}
}
-void RenderViewImpl::AttachWebFrameWidget(blink::WebWidget* frame_widget) {
+void RenderViewImpl::AttachWebFrameWidget(blink::WebFrameWidget* frame_widget) {
// The previous WebFrameWidget must already be detached by CloseForFrame().
DCHECK(!frame_widget_);
frame_widget_ = frame_widget;
@@ -2287,6 +2288,10 @@ blink::WebView* RenderViewImpl::GetWebView() {
return webview();
}
+blink::WebFrameWidget* RenderViewImpl::GetWebFrameWidget() {
+ return frame_widget_;
+}
+
bool RenderViewImpl::ShouldDisplayScrollbars(int width, int height) const {
return (!send_preferred_size_changes_ ||
(disable_scrollbars_size_limit_.width() <= width ||
@@ -2779,8 +2784,8 @@ void RenderViewImpl::OnClearFocusedElement() {
}
void RenderViewImpl::OnSetBackgroundOpaque(bool opaque) {
- if (webview())
- webview()->setIsTransparent(!opaque);
+ if (frame_widget_)
+ frame_widget_->setIsTransparent(!opaque);
if (compositor_)
compositor_->setHasTransparentBackground(!opaque);
}
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698