Commit c82ef82c authored by Marshall Greenblatt's avatar Marshall Greenblatt

Fix OSR popup transparency (issue #2099)

parent 897c0f01
......@@ -40,7 +40,7 @@ void CefBrowserPlatformDelegateOsr::WebContentsCreated(
DCHECK(!view_osr_->web_contents());
// Associate the WebContents with the OSR view.
view_osr_->set_web_contents(web_contents);
view_osr_->WebContentsCreated(web_contents);
}
void CefBrowserPlatformDelegateOsr::BrowserCreated(
......
......@@ -24,10 +24,13 @@ CefWebContentsViewOSR::CefWebContentsViewOSR(bool transparent)
CefWebContentsViewOSR::~CefWebContentsViewOSR() {
}
void CefWebContentsViewOSR::set_web_contents(
void CefWebContentsViewOSR::WebContentsCreated(
content::WebContents* web_contents) {
DCHECK(!web_contents_);
web_contents_ = web_contents;
// Call this again for popup browsers now that the view should exist.
RenderViewCreated(web_contents_->GetRenderViewHost());
}
gfx::NativeView CefWebContentsViewOSR::GetNativeView() const {
......@@ -114,6 +117,8 @@ void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {
}
void CefWebContentsViewOSR::RenderViewCreated(content::RenderViewHost* host) {
// |view| will be nullptr the first time this method is called for popup
// browsers.
CefRenderWidgetHostViewOSR* view = GetView();
if (view)
view->InstallTransparency();
......
......@@ -25,7 +25,7 @@ class CefWebContentsViewOSR : public content::WebContentsView,
explicit CefWebContentsViewOSR(bool transparent);
~CefWebContentsViewOSR() override;
void set_web_contents(content::WebContents* web_contents);
void WebContentsCreated(content::WebContents* web_contents);
content::WebContents* web_contents() const { return web_contents_; }
// WebContentsView methods.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment