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
|
|
|
|
|
|
|
diff --git a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
|
2021-03-04 23:46:13 +00:00
|
|
|
index 7c81d93e92400874b88b639fde5aaa937efdcace..7f7ca0c53dbc41e06b1c566ae605c76d05e9abcb 100644
|
2019-08-22 10:17:50 +00:00
|
|
|
--- a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
|
|
|
|
+++ b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
|
|
|
|
@@ -4,7 +4,7 @@
|
2019-09-18 19:58:00 +00:00
|
|
|
|
2019-08-22 10:17:50 +00:00
|
|
|
#include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h"
|
2019-09-18 19:58:00 +00:00
|
|
|
|
2019-08-22 10:17:50 +00:00
|
|
|
-#include "chrome/grit/generated_resources.h"
|
|
|
|
+#include "electron/grit/electron_resources.h"
|
|
|
|
#include "third_party/skia/include/core/SkColor.h"
|
|
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
|
|
#include "ui/gfx/color_palette.h"
|
|
|
|
diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc
|
2021-03-04 23:46:13 +00:00
|
|
|
index 6ea71449bf68081bd358c280c3c0b65af23fc97c..8e1c9e5e2cdd464ca1b5e6407b5dddccd31cdb2c 100644
|
2019-08-22 10:17:50 +00:00
|
|
|
--- a/chrome/browser/ui/views/overlay/close_image_button.cc
|
|
|
|
+++ b/chrome/browser/ui/views/overlay/close_image_button.cc
|
2020-12-14 18:57:36 +00:00
|
|
|
@@ -5,7 +5,7 @@
|
2019-08-22 10:17:50 +00:00
|
|
|
#include "chrome/browser/ui/views/overlay/close_image_button.h"
|
2019-09-18 19:58:00 +00:00
|
|
|
|
2020-12-14 18:57:36 +00:00
|
|
|
#include "build/chromeos_buildflags.h"
|
2019-08-22 10:17:50 +00:00
|
|
|
-#include "chrome/grit/generated_resources.h"
|
|
|
|
+#include "electron/grit/electron_resources.h"
|
|
|
|
#include "third_party/skia/include/core/SkColor.h"
|
|
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
|
|
#include "ui/gfx/color_palette.h"
|
|
|
|
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
2021-03-04 23:46:13 +00:00
|
|
|
index b148e526ebb4de0111a07a971f038141889bda31..a163cdf5841186235513d9bd9d4ad7279e946d3f 100644
|
2019-08-22 10:17:50 +00:00
|
|
|
--- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
|
|
|
+++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
2020-12-22 22:14:44 +00:00
|
|
|
@@ -15,16 +15,18 @@
|
2020-09-21 08:00:36 +00:00
|
|
|
#include "build/build_config.h"
|
2020-12-14 18:57:36 +00:00
|
|
|
#include "build/chromeos_buildflags.h"
|
2020-09-21 08:00:36 +00:00
|
|
|
#include "chrome/app/vector_icons/vector_icons.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/views/overlay/back_to_tab_image_button.h"
|
|
|
|
#include "chrome/browser/ui/views/overlay/close_image_button.h"
|
|
|
|
#include "chrome/browser/ui/views/overlay/playback_image_button.h"
|
2019-08-22 10:17:50 +00:00
|
|
|
#include "chrome/browser/ui/views/overlay/resize_handle_button.h"
|
|
|
|
#include "chrome/browser/ui/views/overlay/skip_ad_label_button.h"
|
|
|
|
#include "chrome/browser/ui/views/overlay/track_image_button.h"
|
|
|
|
-#include "chrome/grit/generated_resources.h"
|
|
|
|
+#include "electron/grit/electron_resources.h"
|
|
|
|
#include "components/vector_icons/vector_icons.h"
|
|
|
|
#include "content/public/browser/picture_in_picture_window_controller.h"
|
|
|
|
#include "content/public/browser/web_contents.h"
|
2020-12-22 22:14:44 +00:00
|
|
|
@@ -49,7 +51,7 @@
|
2020-09-21 08:00:36 +00:00
|
|
|
#include "ui/aura/window.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
-#if defined(OS_WIN)
|
|
|
|
+#if 0
|
|
|
|
#include "chrome/browser/shell_integration_win.h"
|
|
|
|
#include "ui/aura/window.h"
|
|
|
|
#include "ui/aura/window_tree_host.h"
|
2020-12-22 22:14:44 +00:00
|
|
|
@@ -223,7 +225,7 @@ std::unique_ptr<OverlayWindowViews> OverlayWindowViews::Create(
|
2020-09-21 08:00:36 +00:00
|
|
|
overlay_window->Init(std::move(params));
|
|
|
|
overlay_window->OnRootViewReady();
|
|
|
|
|
|
|
|
-#if defined(OS_WIN)
|
|
|
|
+#if 0
|
2021-03-04 23:46:13 +00:00
|
|
|
std::wstring app_user_model_id;
|
2020-09-21 08:00:36 +00:00
|
|
|
Browser* browser =
|
|
|
|
chrome::FindBrowserWithWebContents(controller->GetWebContents());
|
2019-08-22 10:17:50 +00:00
|
|
|
diff --git a/chrome/browser/ui/views/overlay/playback_image_button.cc b/chrome/browser/ui/views/overlay/playback_image_button.cc
|
2021-03-04 23:46:13 +00:00
|
|
|
index c0fe1f138f441b691ac2cec2242bfc4d3bdf79ca..473eb45178549385c52fcce2e9ff0b2c77dd328d 100644
|
2019-08-22 10:17:50 +00:00
|
|
|
--- a/chrome/browser/ui/views/overlay/playback_image_button.cc
|
|
|
|
+++ b/chrome/browser/ui/views/overlay/playback_image_button.cc
|
|
|
|
@@ -5,7 +5,7 @@
|
|
|
|
#include "chrome/browser/ui/views/overlay/playback_image_button.h"
|
2019-09-18 19:58:00 +00:00
|
|
|
|
2019-08-22 10:17:50 +00:00
|
|
|
#include "chrome/app/vector_icons/vector_icons.h"
|
|
|
|
-#include "chrome/grit/generated_resources.h"
|
|
|
|
+#include "electron/grit/electron_resources.h"
|
|
|
|
#include "components/vector_icons/vector_icons.h"
|
|
|
|
#include "third_party/skia/include/core/SkColor.h"
|
|
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
|
|
diff --git a/chrome/browser/ui/views/overlay/resize_handle_button.cc b/chrome/browser/ui/views/overlay/resize_handle_button.cc
|
2021-03-04 23:46:13 +00:00
|
|
|
index 51ce84d8e294a35e4c9d59387bdc7df0d7828070..03dd9142eb8cb899d856f1410694b152189102ab 100644
|
2019-08-22 10:17:50 +00:00
|
|
|
--- a/chrome/browser/ui/views/overlay/resize_handle_button.cc
|
|
|
|
+++ b/chrome/browser/ui/views/overlay/resize_handle_button.cc
|
|
|
|
@@ -5,7 +5,7 @@
|
|
|
|
#include "chrome/browser/ui/views/overlay/resize_handle_button.h"
|
2019-09-18 19:58:00 +00:00
|
|
|
|
2019-08-22 10:17:50 +00:00
|
|
|
#include "chrome/app/vector_icons/vector_icons.h"
|
|
|
|
-#include "chrome/grit/generated_resources.h"
|
|
|
|
+#include "electron/grit/electron_resources.h"
|
|
|
|
#include "third_party/skia/include/core/SkColor.h"
|
|
|
|
#include "ui/base/hit_test.h"
|
|
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
|
|
diff --git a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
|
2021-03-04 23:46:13 +00:00
|
|
|
index e5a05b7b04c9679f0b61f0b997f5326ccf881dbf..7ddd4d5f9b55a403b207445f86d78ec62cfc9cc9 100644
|
2019-08-22 10:17:50 +00:00
|
|
|
--- a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
|
|
|
|
+++ b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
|
|
|
|
@@ -4,7 +4,7 @@
|
2019-09-18 19:58:00 +00:00
|
|
|
|
2019-08-22 10:17:50 +00:00
|
|
|
#include "chrome/browser/ui/views/overlay/skip_ad_label_button.h"
|
2019-09-18 19:58:00 +00:00
|
|
|
|
2019-08-22 10:17:50 +00:00
|
|
|
-#include "chrome/grit/generated_resources.h"
|
|
|
|
+#include "electron/grit/electron_resources.h"
|
|
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
|
|
#include "ui/gfx/color_palette.h"
|
|
|
|
#include "ui/views/background.h"
|
|
|
|
diff --git a/chrome/browser/ui/views/overlay/track_image_button.cc b/chrome/browser/ui/views/overlay/track_image_button.cc
|
2021-03-04 23:46:13 +00:00
|
|
|
index dbcbbabe7df945f797559b46eaa04f02162299e0..1852ff15198970a92275d65582ec19c55a125314 100644
|
2019-08-22 10:17:50 +00:00
|
|
|
--- a/chrome/browser/ui/views/overlay/track_image_button.cc
|
|
|
|
+++ b/chrome/browser/ui/views/overlay/track_image_button.cc
|
|
|
|
@@ -5,7 +5,7 @@
|
|
|
|
#include "chrome/browser/ui/views/overlay/track_image_button.h"
|
2019-09-18 19:58:00 +00:00
|
|
|
|
2019-08-22 10:17:50 +00:00
|
|
|
#include "chrome/app/vector_icons/vector_icons.h"
|
|
|
|
-#include "chrome/grit/generated_resources.h"
|
|
|
|
+#include "electron/grit/electron_resources.h"
|
|
|
|
#include "components/vector_icons/vector_icons.h"
|
|
|
|
#include "third_party/skia/include/core/SkColor.h"
|
|
|
|
#include "ui/base/l10n/l10n_util.h"
|