2019-08-22 10:17:50 +00:00
|
|
|
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
|
|
|
|
|
2019-12-13 17:18:45 +00:00
|
|
|
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.
|
2019-08-22 10:17:50 +00:00
|
|
|
|
2023-09-06 01:17:56 +00:00
|
|
|
diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc
|
2024-01-11 06:33:40 +00:00
|
|
|
index 1a0c7f5f204f00b52747ebb7800b39a3479f1178..52a1b350c8b5a13b4c0636b43f4773b72872f025 100644
|
2023-09-06 01:17:56 +00:00
|
|
|
--- a/chrome/browser/ui/views/overlay/close_image_button.cc
|
|
|
|
+++ b/chrome/browser/ui/views/overlay/close_image_button.cc
|
|
|
|
@@ -4,11 +4,14 @@
|
|
|
|
|
|
|
|
#include "chrome/browser/ui/views/overlay/close_image_button.h"
|
|
|
|
|
|
|
|
+#include "build/branding_buildflags.h"
|
|
|
|
#include "build/chromeos_buildflags.h"
|
|
|
|
#include "chrome/browser/ui/color/chrome_color_id.h"
|
|
|
|
#include "chrome/grit/generated_resources.h"
|
|
|
|
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
|
|
|
#include "components/omnibox/browser/omnibox_field_trial.h"
|
|
|
|
#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"
|
|
|
|
@@ -28,9 +31,11 @@ CloseImageButton::CloseImageButton(PressedCallback callback)
|
|
|
|
SetSize(gfx::Size(kCloseButtonSize, kCloseButtonSize));
|
|
|
|
|
|
|
|
auto* icon = &views::kIcCloseIcon;
|
|
|
|
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
|
|
|
if (OmniboxFieldTrial::IsChromeRefreshIconsEnabled()) {
|
|
|
|
icon = &vector_icons::kCloseChromeRefreshIcon;
|
|
|
|
}
|
|
|
|
+#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
|
|
|
SetImageModel(views::Button::STATE_NORMAL,
|
|
|
|
ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
|
|
|
|
kCloseButtonIconSize));
|
2022-02-25 18:17:35 +00:00
|
|
|
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
2024-05-10 15:21:10 +00:00
|
|
|
index 8110f1c5909e8996b1d847267f0aab3eff8339fa..28d3689be10469fa9f6bd8e608717c4d13a92620 100644
|
2022-02-25 18:17:35 +00:00
|
|
|
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
|
|
|
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
2023-12-11 20:58:26 +00:00
|
|
|
@@ -17,9 +17,11 @@
|
2022-02-25 18:17:35 +00:00
|
|
|
#include "build/build_config.h"
|
2023-12-11 20:58:26 +00:00
|
|
|
#include "chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker.h"
|
2023-09-18 20:44:09 +00:00
|
|
|
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
|
2022-02-25 18:17:35 +00:00
|
|
|
+#if 0
|
|
|
|
#include "chrome/browser/profiles/profile.h"
|
|
|
|
#include "chrome/browser/ui/browser.h"
|
|
|
|
#include "chrome/browser/ui/browser_finder.h"
|
|
|
|
+#endif
|
2022-03-25 01:39:03 +00:00
|
|
|
#include "chrome/browser/ui/color/chrome_color_id.h"
|
2022-02-25 18:17:35 +00:00
|
|
|
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
|
2022-12-05 22:59:19 +00:00
|
|
|
#include "chrome/browser/ui/views/overlay/close_image_button.h"
|
2023-12-11 20:58:26 +00:00
|
|
|
@@ -58,7 +60,7 @@
|
2022-02-25 18:17:35 +00:00
|
|
|
#include "ui/aura/window.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-#if BUILDFLAG(IS_WIN)
|
|
|
|
+#if 0
|
|
|
|
#include "chrome/browser/shell_integration_win.h"
|
2024-03-12 09:15:41 +00:00
|
|
|
#include "content/public/browser/render_widget_host_view.h"
|
2022-02-25 18:17:35 +00:00
|
|
|
#include "ui/aura/window.h"
|
2024-03-12 09:15:41 +00:00
|
|
|
@@ -310,7 +312,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
|
2022-02-25 18:17:35 +00:00
|
|
|
overlay_window->Init(std::move(params));
|
|
|
|
overlay_window->OnRootViewReady();
|
|
|
|
|
|
|
|
-#if BUILDFLAG(IS_WIN)
|
|
|
|
+#if 0
|
|
|
|
std::wstring app_user_model_id;
|
2023-10-24 15:24:20 +00:00
|
|
|
Browser* browser = chrome::FindBrowserWithTab(controller->GetWebContents());
|
|
|
|
if (browser) {
|