mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-07 15:53:08 +01:00
Fix OSR popup transparency (issue #2099)
This commit is contained in:
parent
067d91504f
commit
558741c384
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user