Add callback to allow Document PiP moveTo/By() (fixes #3714)

Allow Document picture-in-picture moveTo/By() and resizeTo/By()
(without user gesture) if the new
CefBrowserViewDelegate::AllowMoveForPictureInPicture callback
returns true.
This commit is contained in:
Marshall Greenblatt
2025-04-22 14:05:23 +00:00
parent d746017d7c
commit 77f2451a5e
28 changed files with 318 additions and 148 deletions

View File

@@ -15,6 +15,7 @@
#include "cef/include/cef_drag_data.h"
#include "cef/include/internal/cef_types.h"
#include "cef/include/views/cef_browser_view.h"
#include "cef/libcef/renderer/browser_config.h"
#include "third_party/blink/public/common/page/drag_operation.h"
#include "third_party/blink/public/mojom/drag/drag.mojom-forward.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -370,6 +371,12 @@ class CefBrowserPlatformDelegate {
bool findNext);
virtual void StopFinding(bool clearSelection);
virtual bool IsMovePictureInPictureEnabled() const;
// CefBrowser configuration determined prior to CefBrowserHost creation and
// passed to the renderer process via the GetNewBrowserInfo Mojo request.
cef::BrowserConfig GetBrowserConfig() const;
protected:
// Allow deletion via std::unique_ptr only.
friend std::default_delete<CefBrowserPlatformDelegate>;