mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Standardize fullscreen transition behavor/callbacks (fixes #3571)
Use the same code path for all fullscreen transitions so that Chrome UI updates correctly. All user-initiated fullscreen transitions now result in CefWindowDelegate::OnWindowFullscreenTransition callbacks.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "include/views/cef_window.h"
|
||||
#include "include/views/cef_window_delegate.h"
|
||||
#include "libcef/browser/views/ns_window.h"
|
||||
#include "libcef/browser/views/window_impl.h"
|
||||
|
||||
#include "chrome/browser/apps/app_shim/app_shim_host_mac.h"
|
||||
#include "chrome/browser/apps/app_shim/app_shim_manager_mac.h"
|
||||
@@ -118,12 +119,16 @@ void CefNativeWidgetMac::GetWindowFrameTitlebarHeight(
|
||||
|
||||
void CefNativeWidgetMac::OnWindowFullscreenTransitionStart() {
|
||||
views::NativeWidgetMac::OnWindowFullscreenTransitionStart();
|
||||
window_delegate_->OnWindowFullscreenTransition(window_, false);
|
||||
if (IsCefWindowInitialized()) {
|
||||
window_delegate_->OnWindowFullscreenTransition(window_, false);
|
||||
}
|
||||
}
|
||||
|
||||
void CefNativeWidgetMac::OnWindowFullscreenTransitionComplete() {
|
||||
views::NativeWidgetMac::OnWindowFullscreenTransitionComplete();
|
||||
window_delegate_->OnWindowFullscreenTransition(window_, true);
|
||||
if (IsCefWindowInitialized()) {
|
||||
window_delegate_->OnWindowFullscreenTransition(window_, true);
|
||||
}
|
||||
}
|
||||
|
||||
void CefNativeWidgetMac::OnWindowInitialized() {
|
||||
@@ -142,3 +147,7 @@ void CefNativeWidgetMac::OnWindowInitialized() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool CefNativeWidgetMac::IsCefWindowInitialized() const {
|
||||
return static_cast<CefWindowImpl*>(window_.get())->initialized();
|
||||
}
|
||||
|
Reference in New Issue
Block a user