mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@@ -38,6 +38,7 @@
|
||||
#define CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_DELEGATE_H_
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_api_hash.h"
|
||||
#include "include/cef_client.h"
|
||||
#include "include/views/cef_view_delegate.h"
|
||||
|
||||
@@ -129,6 +130,18 @@ class CefBrowserViewDelegate : public CefViewDelegate {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if CEF_API_ADDED(CEF_NEXT)
|
||||
///
|
||||
/// Return true to allow the use of JavaScript moveTo/By() and resizeTo/By()
|
||||
/// (without user activation) with Document picture-in-picture popups.
|
||||
///
|
||||
/*--cef(added=next)--*/
|
||||
virtual bool AllowMoveForPictureInPicture(
|
||||
CefRefPtr<CefBrowserView> browser_view) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
///
|
||||
/// Called when |browser_view| receives a gesture command. Return true to
|
||||
/// handle (or disable) a |gesture_command| or false to propagate the gesture
|
||||
|
Reference in New Issue
Block a user