feat: enable picture-in-picture mode for video tags (#17686)
* feat: enable picture in picture mode for video tags * test: add test to verify picture in picture support * lint: fix indent * fix: clean up after rebase * test: update test with 16:9 test video * fix: .paches after rebase
This commit is contained in:
parent
46b6bcd99b
commit
9ccd6aa0dd
15 changed files with 318 additions and 0 deletions
|
@ -402,6 +402,9 @@ void AtomBrowserClient::OverrideWebkitPrefs(content::RenderViewHost* host,
|
|||
prefs->default_minimum_page_scale_factor = 1.f;
|
||||
prefs->default_maximum_page_scale_factor = 1.f;
|
||||
prefs->navigate_on_drag_drop = false;
|
||||
#if !BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
|
||||
prefs->picture_in_picture_enabled = false;
|
||||
#endif
|
||||
|
||||
ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi();
|
||||
prefs->preferred_color_scheme = native_theme->ShouldUseDarkColors()
|
||||
|
@ -684,6 +687,14 @@ bool AtomBrowserClient::CanCreateWindow(
|
|||
return false;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
|
||||
std::unique_ptr<content::OverlayWindow>
|
||||
AtomBrowserClient::CreateWindowForPictureInPicture(
|
||||
content::PictureInPictureWindowController* controller) {
|
||||
return content::OverlayWindow::Create(controller);
|
||||
}
|
||||
#endif
|
||||
|
||||
void AtomBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
|
||||
std::vector<std::string>* additional_schemes) {
|
||||
auto schemes_list = api::GetStandardSchemes();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue