chore: remove unneeded SetBackgroundOpaque hack (#35496)

This commit is contained in:
Jeremy Rose 2022-08-31 17:40:26 -07:00 committed by GitHub
parent f99122abfc
commit a7248af79e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 31 deletions

View file

@ -158,18 +158,6 @@ void BrowserWindow::RenderViewHostChanged(content::RenderViewHost* old_host,
new_host->GetWidget()->AddInputEventObserver(this);
}
void BrowserWindow::RenderFrameCreated(
content::RenderFrameHost* render_frame_host) {
if (!window()->transparent())
return;
content::RenderWidgetHostImpl* impl = content::RenderWidgetHostImpl::FromID(
render_frame_host->GetProcess()->GetID(),
render_frame_host->GetRoutingID());
if (impl)
impl->owner_delegate()->SetBackgroundOpaque(false);
}
void BrowserWindow::DidFirstVisuallyNonEmptyPaint() {
if (window()->IsClosed() || window()->IsVisible())
return;
@ -438,23 +426,6 @@ void BrowserWindow::OnDevToolsResized() {
UpdateDraggableRegions(draggable_regions_);
}
void BrowserWindow::SetVibrancy(v8::Isolate* isolate,
v8::Local<v8::Value> value) {
std::string type = gin::V8ToString(isolate, value);
auto* render_view_host = web_contents()->GetRenderViewHost();
if (render_view_host) {
auto* impl = content::RenderWidgetHostImpl::FromID(
render_view_host->GetProcess()->GetID(),
render_view_host->GetRoutingID());
if (impl)
impl->owner_delegate()->SetBackgroundOpaque(
type.empty() ? !window_->transparent() : false);
}
BaseWindow::SetVibrancy(isolate, value);
}
void BrowserWindow::FocusOnWebView() {
web_contents()->GetRenderViewHost()->GetWidget()->Focus();
}

View file

@ -49,7 +49,6 @@ class BrowserWindow : public BaseWindow,
// content::WebContentsObserver:
void RenderViewHostChanged(content::RenderViewHost* old_host,
content::RenderViewHost* new_host) override;
void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
void DidFirstVisuallyNonEmptyPaint() override;
void BeforeUnloadDialogCancelled() override;
void OnRendererUnresponsive(content::RenderProcessHost*) override;
@ -89,7 +88,6 @@ class BrowserWindow : public BaseWindow,
void SetTopBrowserView(gin::Handle<BrowserView> browser_view,
gin_helper::Arguments* args) override;
void ResetBrowserViews() override;
void SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value) override;
void OnWindowShow() override;
void OnWindowHide() override;