Move Alloy-specific logic to CefBrowserPlatformDelegateAlloy (see issue #2969)

Also remove OSR-related methods where the attributes can instead be passed
to the OSR platform delegate constructor directly.
This commit is contained in:
Marshall Greenblatt
2020-07-04 14:21:34 -04:00
parent e9bf3cdb98
commit 02cdf05848
30 changed files with 669 additions and 537 deletions

View File

@@ -68,14 +68,14 @@ void CefBrowserPlatformDelegateViews::SetBrowserView(
void CefBrowserPlatformDelegateViews::WebContentsCreated(
content::WebContents* web_contents,
bool owned) {
CefBrowserPlatformDelegate::WebContentsCreated(web_contents, owned);
CefBrowserPlatformDelegateAlloy::WebContentsCreated(web_contents, owned);
browser_view_->WebContentsCreated(web_contents);
}
void CefBrowserPlatformDelegateViews::BrowserCreated(
CefBrowserHostImpl* browser) {
CefBrowserPlatformDelegate::BrowserCreated(browser);
CefBrowserPlatformDelegateAlloy::BrowserCreated(browser);
native_delegate_->set_browser(browser);
browser_view_->BrowserCreated(browser, GetBoundsChangedCallback());
@@ -97,7 +97,7 @@ void CefBrowserPlatformDelegateViews::NotifyBrowserDestroyed() {
void CefBrowserPlatformDelegateViews::BrowserDestroyed(
CefBrowserHostImpl* browser) {
CefBrowserPlatformDelegate::BrowserDestroyed(browser);
CefBrowserPlatformDelegateAlloy::BrowserDestroyed(browser);
native_delegate_->set_browser(nullptr);
browser_view_->BrowserDestroyed(browser);
@@ -173,14 +173,6 @@ void CefBrowserPlatformDelegateViews::PopupBrowserCreated(
}
}
bool CefBrowserPlatformDelegateViews::CanUseSharedTexture() const {
return native_delegate_->CanUseSharedTexture();
}
bool CefBrowserPlatformDelegateViews::CanUseExternalBeginFrame() const {
return native_delegate_->CanUseExternalBeginFrame();
}
SkColor CefBrowserPlatformDelegateViews::GetBackgroundColor() const {
return native_delegate_->GetBackgroundColor();
}