electron/patches/chromium/picture-in-picture.patch
trop[bot] e7eb572c21
chore: bump chromium to 132.0.6826.0 (34-x-y) (#44603)
* chore: bump chromium in DEPS to 132.0.6821.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 132.0.6822.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* chore: bump chromium in DEPS to 132.0.6824.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 5998172: Migrate remaining NOTREACHED()s in chrome/ | https://chromium-review.googlesource.com/c/chromium/src/+/5998172

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 5872484: Pass along accelerators for menu items coming from DevTools | https://chromium-review.googlesource.com/c/chromium/src/+/5872484

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* chore: update patches

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 5872913: Enable `raw_span` clang plugin [1/2] | https://chromium-review.googlesource.com/c/chromium/src/+/5872913

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* fixup! picture-in-picture import

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* 5912245: [video pip] Add progress bar to 2024 UI | https://chromium-review.googlesource.com/c/chromium/src/+/5912245

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* fixup! 5872913: Enable raw_span clang plugin [1/2] | https://chromium-review.googlesource.com/c/chromium/src/+/5872913

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2024-11-09 08:08:26 -06:00

73 lines
3.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Heilig Benedek <benecene@gmail.com>
Date: Sat, 10 Aug 2019 00:41:50 +0200
Subject: feat: enable picture in picture mode for video players
These files are needed to implement PiP, but the Electron build patches out
chrome's generated resources for our own. This updates the #include so that we
don't get errors for Chrome's generated resources, which are non-existent
because we don't generate them in our build.
diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc
index 91ef40b1c054ffceec006400c18d68b5ab393161..7a33b6e01b57b58a77ec54be59f6f3235dab936c 100644
--- a/chrome/browser/ui/views/overlay/close_image_button.cc
+++ b/chrome/browser/ui/views/overlay/close_image_button.cc
@@ -4,9 +4,12 @@
#include "chrome/browser/ui/views/overlay/close_image_button.h"
+#include "build/branding_buildflags.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/grit/generated_resources.h"
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
#include "components/vector_icons/vector_icons.h"
+#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/models/image_model.h"
@@ -26,7 +29,10 @@ CloseImageButton::CloseImageButton(PressedCallback callback)
: OverlayWindowImageButton(std::move(callback)) {
SetSize(gfx::Size(kCloseButtonSize, kCloseButtonSize));
- auto* icon = &vector_icons::kCloseChromeRefreshIcon;
+ auto* icon = &views::kIcCloseIcon;
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ icon = &vector_icons::kCloseChromeRefreshIcon;
+#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
SetImageModel(views::Button::STATE_NORMAL,
ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
kCloseButtonIconSize));
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index 0ca5d6f5680e5e1342a3ad75e4b0ebbda5122805..d3e8b53be5a5184c2cca905bebaec5a5a4a84569 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -17,9 +17,11 @@
#include "build/build_config.h"
#include "chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker.h"
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
+#if 0
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
+#endif
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/views/overlay/back_to_tab_button.h"
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
@@ -63,7 +65,7 @@
#include "ui/aura/window.h"
#endif
-#if BUILDFLAG(IS_WIN)
+#if 0
#include "chrome/browser/shell_integration_win.h"
#include "content/public/browser/render_widget_host_view.h"
#include "ui/aura/window.h"
@@ -323,7 +325,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
overlay_window->Init(std::move(params));
overlay_window->OnRootViewReady();
-#if BUILDFLAG(IS_WIN)
+#if 0
std::wstring app_user_model_id;
Browser* browser = chrome::FindBrowserWithTab(controller->GetWebContents());
if (browser) {