chrome: Fix crashes when toggling full-screen mode (fixes issue #3182)
This commit is contained in:
parent
2428b35f6c
commit
031c8a7f52
|
@ -129,7 +129,7 @@ index 6a1e9abbc66aa..aa9e3ebe2599c 100644
|
||||||
BrowserFrame(const BrowserFrame&) = delete;
|
BrowserFrame(const BrowserFrame&) = delete;
|
||||||
BrowserFrame& operator=(const BrowserFrame&) = delete;
|
BrowserFrame& operator=(const BrowserFrame&) = delete;
|
||||||
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
|
diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
|
||||||
index 3c6fcbebb84bb..db469505c4ab2 100644
|
index 3c6fcbebb84bb..f2eb23d39e5ee 100644
|
||||||
--- chrome/browser/ui/views/frame/browser_view.cc
|
--- chrome/browser/ui/views/frame/browser_view.cc
|
||||||
+++ chrome/browser/ui/views/frame/browser_view.cc
|
+++ chrome/browser/ui/views/frame/browser_view.cc
|
||||||
@@ -291,11 +291,10 @@ using content::WebContents;
|
@@ -291,11 +291,10 @@ using content::WebContents;
|
||||||
|
@ -257,6 +257,34 @@ index 3c6fcbebb84bb..db469505c4ab2 100644
|
||||||
using_native_frame_ = frame_->ShouldUseNativeFrame();
|
using_native_frame_ = frame_->ShouldUseNativeFrame();
|
||||||
|
|
||||||
MaybeInitializeWebUITabStrip();
|
MaybeInitializeWebUITabStrip();
|
||||||
|
@@ -3755,7 +3777,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
|
||||||
|
// Undo our anti-jankiness hacks and force a re-layout.
|
||||||
|
in_process_fullscreen_ = false;
|
||||||
|
ToolbarSizeChanged(false);
|
||||||
|
- frame_->GetFrameView()->OnFullscreenStateChanged();
|
||||||
|
+ if (frame_->GetFrameView())
|
||||||
|
+ frame_->GetFrameView()->OnFullscreenStateChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
|
||||||
|
@@ -4046,6 +4069,8 @@ Profile* BrowserView::GetProfile() {
|
||||||
|
}
|
||||||
|
|
||||||
|
void BrowserView::UpdateUIForTabFullscreen() {
|
||||||
|
+ if (!frame_->GetFrameView())
|
||||||
|
+ return;
|
||||||
|
frame()->GetFrameView()->UpdateFullscreenTopUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -4068,6 +4093,8 @@ void BrowserView::HideDownloadShelf() {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BrowserView::CanUserExitFullscreen() const {
|
||||||
|
+ if (!frame_->GetFrameView())
|
||||||
|
+ return true;
|
||||||
|
return frame_->GetFrameView()->CanUserExitFullscreen();
|
||||||
|
}
|
||||||
|
|
||||||
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
|
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
|
||||||
index 6eea8b4b899e2..4dc56c94baa3f 100644
|
index 6eea8b4b899e2..4dc56c94baa3f 100644
|
||||||
--- chrome/browser/ui/views/frame/browser_view.h
|
--- chrome/browser/ui/views/frame/browser_view.h
|
||||||
|
|
Loading…
Reference in New Issue