mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-10 03:47:44 -03:00
Update browser_view.cc
This commit is contained in:
parent
070b8849c8
commit
0b2e2e3e59
1 changed files with 5 additions and 6 deletions
|
@ -3126,6 +3126,9 @@ BrowserView::GetNativeViewHostsForTopControlsSlide() const {
|
|||
}
|
||||
|
||||
void BrowserView::ReparentTopContainerForEndOfImmersive() {
|
||||
if (top_container()->parent() == this)
|
||||
return;
|
||||
|
||||
overlay_view_->SetVisible(false);
|
||||
top_container()->DestroyLayer();
|
||||
AddChildViewAt(top_container(), 0);
|
||||
|
@ -3343,16 +3346,12 @@ views::View* BrowserView::CreateOverlayView() {
|
|||
#if BUILDFLAG(IS_MAC)
|
||||
views::View* BrowserView::CreateMacOverlayView() {
|
||||
views::Widget::InitParams params;
|
||||
// Keep around overlay_widget_ and overlay_view_ until this
|
||||
// BrowserView is deconstructed. overlay_view_ is used during BrowserView
|
||||
// deconstruction.
|
||||
// TODO(bur): Refactor usage of WIDGET_OWNS_NATIVE_WIDGET.
|
||||
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
|
||||
params.type = views::Widget::InitParams::TYPE_POPUP;
|
||||
params.child = true;
|
||||
params.parent = GetWidget()->GetNativeView();
|
||||
overlay_widget_ = std::make_unique<ThemeCopyingWidget>(GetWidget());
|
||||
overlay_widget_ = new ThemeCopyingWidget(GetWidget());
|
||||
overlay_widget_->Init(std::move(params));
|
||||
overlay_widget_->SetNativeWindowProperty(kBrowserViewKey, this);
|
||||
|
||||
std::unique_ptr<TopContainerOverlayView> overlay_view =
|
||||
std::make_unique<TopContainerOverlayView>(weak_ptr_factory_.GetWeakPtr());
|
||||
|
|
Loading…
Reference in a new issue