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:
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=12bd03a8fb7d680a4e2b1a6818313c29bf14f011$
|
||||
// $hash=bb69763a25cd013a50504d762a81c0a4454ce8eb$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/views/window_delegate_ctocpp.h"
|
||||
@@ -129,6 +129,30 @@ void CefWindowDelegateCToCpp::OnWindowBoundsChanged(CefRefPtr<CefWindow> window,
|
||||
&new_bounds);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
void CefWindowDelegateCToCpp::OnWindowFullscreenTransition(
|
||||
CefRefPtr<CefWindow> window,
|
||||
bool is_completed) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
cef_window_delegate_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_window_fullscreen_transition)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: window; type: refptr_diff
|
||||
DCHECK(window.get());
|
||||
if (!window.get()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute
|
||||
_struct->on_window_fullscreen_transition(
|
||||
_struct, CefWindowCppToC::Wrap(window), is_completed);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefRefPtr<CefWindow> CefWindowDelegateCToCpp::GetParentWindow(
|
||||
CefRefPtr<CefWindow> window,
|
||||
@@ -487,30 +511,6 @@ bool CefWindowDelegateCToCpp::OnKeyEvent(CefRefPtr<CefWindow> window,
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
void CefWindowDelegateCToCpp::OnWindowFullscreenTransition(
|
||||
CefRefPtr<CefWindow> window,
|
||||
bool is_completed) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
cef_window_delegate_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_window_fullscreen_transition)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: window; type: refptr_diff
|
||||
DCHECK(window.get());
|
||||
if (!window.get()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Execute
|
||||
_struct->on_window_fullscreen_transition(
|
||||
_struct, CefWindowCppToC::Wrap(window), is_completed);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefSize CefWindowDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
@@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=25487f4d82069d1e4c0c7b27c1c1fcbcebbbacea$
|
||||
// $hash=e1ed42bb378f9f140e006ec582c0e908f711e7fa$
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_DELEGATE_CTOCPP_H_
|
||||
@@ -44,6 +44,8 @@ class CefWindowDelegateCToCpp
|
||||
bool active) override;
|
||||
void OnWindowBoundsChanged(CefRefPtr<CefWindow> window,
|
||||
const CefRect& new_bounds) override;
|
||||
void OnWindowFullscreenTransition(CefRefPtr<CefWindow> window,
|
||||
bool is_completed) override;
|
||||
CefRefPtr<CefWindow> GetParentWindow(CefRefPtr<CefWindow> window,
|
||||
bool* is_menu,
|
||||
bool* can_activate_menu) override;
|
||||
@@ -61,8 +63,6 @@ class CefWindowDelegateCToCpp
|
||||
bool OnAccelerator(CefRefPtr<CefWindow> window, int command_id) override;
|
||||
bool OnKeyEvent(CefRefPtr<CefWindow> window,
|
||||
const CefKeyEvent& event) override;
|
||||
void OnWindowFullscreenTransition(CefRefPtr<CefWindow> window,
|
||||
bool is_completed) override;
|
||||
|
||||
// CefPanelDelegate methods.
|
||||
|
||||
|
Reference in New Issue
Block a user