build: remove enable_picture_in_picture build flag (#38620)
Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
parent
933544d449
commit
0294debc31
10 changed files with 30 additions and 68 deletions
|
@ -23,6 +23,7 @@
|
|||
#include "base/threading/scoped_blocking_call.h"
|
||||
#include "base/values.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
|
||||
#include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
|
||||
#include "chrome/browser/ui/views/eye_dropper/eye_dropper.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
|
@ -184,10 +185,6 @@
|
|||
#endif
|
||||
#endif // BUILDFLAG(ENABLE_PRINTING)
|
||||
|
||||
#if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
|
||||
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
#include "components/pdf/browser/pdf_web_contents_helper.h" // nogncheck
|
||||
#include "shell/browser/electron_pdf_web_contents_helper_client.h"
|
||||
|
@ -3896,18 +3893,12 @@ bool WebContents::TakeFocus(content::WebContents* source, bool reverse) {
|
|||
|
||||
content::PictureInPictureResult WebContents::EnterPictureInPicture(
|
||||
content::WebContents* web_contents) {
|
||||
#if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
|
||||
return PictureInPictureWindowManager::GetInstance()
|
||||
->EnterVideoPictureInPicture(web_contents);
|
||||
#else
|
||||
return content::PictureInPictureResult::kNotSupported;
|
||||
#endif
|
||||
}
|
||||
|
||||
void WebContents::ExitPictureInPicture() {
|
||||
#if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
|
||||
PictureInPictureWindowManager::GetInstance()->ExitPictureInPicture();
|
||||
#endif
|
||||
}
|
||||
|
||||
void WebContents::DevToolsSaveToFile(const std::string& url,
|
||||
|
|
|
@ -186,7 +186,7 @@
|
|||
#include "components/crash/core/app/crashpad.h" // nogncheck
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE) && BUILDFLAG(IS_WIN)
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "chrome/browser/ui/views/overlay/video_overlay_window_views.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "ui/aura/window.h"
|
||||
|
@ -422,9 +422,6 @@ void ElectronBrowserClient::OverrideWebkitPrefs(
|
|||
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 =
|
||||
|
@ -674,7 +671,6 @@ bool ElectronBrowserClient::CanCreateWindow(
|
|||
return false;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
|
||||
std::unique_ptr<content::VideoOverlayWindow>
|
||||
ElectronBrowserClient::CreateWindowForVideoPictureInPicture(
|
||||
content::VideoPictureInPictureWindowController* controller) {
|
||||
|
@ -692,7 +688,6 @@ ElectronBrowserClient::CreateWindowForVideoPictureInPicture(
|
|||
#endif
|
||||
return overlay_window;
|
||||
}
|
||||
#endif
|
||||
|
||||
void ElectronBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
|
||||
std::vector<std::string>* additional_schemes) {
|
||||
|
|
|
@ -160,11 +160,9 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
|||
bool user_gesture,
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) override;
|
||||
#if BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
|
||||
std::unique_ptr<content::VideoOverlayWindow>
|
||||
CreateWindowForVideoPictureInPicture(
|
||||
content::VideoPictureInPictureWindowController* controller) override;
|
||||
#endif
|
||||
void GetAdditionalAllowedSchemesForFileSystem(
|
||||
std::vector<std::string>* additional_schemes) override;
|
||||
void GetAdditionalWebUISchemes(
|
||||
|
|
|
@ -36,10 +36,6 @@ void InitializeFeatureList() {
|
|||
disable_features +=
|
||||
std::string(",") + features::kSpareRendererForSitePerProcess.name;
|
||||
|
||||
#if !BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
|
||||
disable_features += std::string(",") + media::kPictureInPicture.name;
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
disable_features +=
|
||||
// Disable async spellchecker suggestions for Windows, which causes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue