170 lines
8.5 KiB
Diff
170 lines
8.5 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/back_to_tab_image_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
|
|
index 3afa0d34a6aff1d8882592fc4a3720698124a9c4..18de9f4e9c3c9599d1ab83a638bbd887b9f7cc59 100644
|
|
--- a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
|
|
+++ b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
|
|
@@ -5,7 +5,7 @@
|
|
#include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h"
|
|
|
|
#include "chrome/browser/ui/views/overlay/constants.h"
|
|
-#include "chrome/grit/generated_resources.h"
|
|
+#include "electron/grit/electron_resources.h"
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
#include "ui/base/metadata/metadata_impl_macros.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
|
|
index b40d96b754118c1dd1f1fb62f441a5a870d16ed9..7e205e324f5a8604ae6624c42b5b216e3070c072 100644
|
|
--- a/chrome/browser/ui/views/overlay/close_image_button.cc
|
|
+++ b/chrome/browser/ui/views/overlay/close_image_button.cc
|
|
@@ -6,7 +6,7 @@
|
|
|
|
#include "build/chromeos_buildflags.h"
|
|
#include "chrome/browser/ui/views/overlay/constants.h"
|
|
-#include "chrome/grit/generated_resources.h"
|
|
+#include "electron/grit/electron_resources.h"
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
#include "ui/base/metadata/metadata_impl_macros.h"
|
|
#include "ui/gfx/color_palette.h"
|
|
diff --git a/chrome/browser/ui/views/overlay/hang_up_button.cc b/chrome/browser/ui/views/overlay/hang_up_button.cc
|
|
index 4b741d67c4c20766e248f0799825103ba4f2a1ce..adf85811da98e1666e8e93e5b339e176ecfe64e3 100644
|
|
--- a/chrome/browser/ui/views/overlay/hang_up_button.cc
|
|
+++ b/chrome/browser/ui/views/overlay/hang_up_button.cc
|
|
@@ -5,7 +5,7 @@
|
|
#include "chrome/browser/ui/views/overlay/hang_up_button.h"
|
|
|
|
#include "chrome/browser/ui/views/overlay/constants.h"
|
|
-#include "chrome/grit/generated_resources.h"
|
|
+#include "electron/grit/electron_resources.h"
|
|
#include "components/vector_icons/vector_icons.h"
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
#include "ui/gfx/paint_vector_icon.h"
|
|
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
|
index c996365b075abf026b4c26bce0ec89668cf933b8..04c6218f5f59b2d0d3d8e005461fa016fc4e1f33 100644
|
|
--- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
|
+++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
|
@@ -16,9 +16,11 @@
|
|
#include "build/build_config.h"
|
|
#include "build/chromeos_buildflags.h"
|
|
#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/back_to_tab_label_button.h"
|
|
#include "chrome/browser/ui/views/overlay/close_image_button.h"
|
|
@@ -29,7 +31,7 @@
|
|
#include "chrome/browser/ui/views/overlay/toggle_camera_button.h"
|
|
#include "chrome/browser/ui/views/overlay/toggle_microphone_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/url_formatter/url_formatter.h"
|
|
#include "components/vector_icons/vector_icons.h"
|
|
#include "content/public/browser/picture_in_picture_window_controller.h"
|
|
@@ -56,7 +58,7 @@
|
|
#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"
|
|
@@ -240,7 +242,7 @@ std::unique_ptr<OverlayWindowViews> OverlayWindowViews::Create(
|
|
overlay_window->Init(std::move(params));
|
|
overlay_window->OnRootViewReady();
|
|
|
|
-#if defined(OS_WIN)
|
|
+#if 0
|
|
std::wstring app_user_model_id;
|
|
Browser* browser =
|
|
chrome::FindBrowserWithWebContents(controller->GetWebContents());
|
|
diff --git a/chrome/browser/ui/views/overlay/playback_image_button.cc b/chrome/browser/ui/views/overlay/playback_image_button.cc
|
|
index ab1717bd630e8f143a2ba6dddfeb04bc95beb7fd..2cf5bcd690a9db84cb14c409f31a82da6a9c0348 100644
|
|
--- a/chrome/browser/ui/views/overlay/playback_image_button.cc
|
|
+++ b/chrome/browser/ui/views/overlay/playback_image_button.cc
|
|
@@ -6,7 +6,7 @@
|
|
|
|
#include "chrome/app/vector_icons/vector_icons.h"
|
|
#include "chrome/browser/ui/views/overlay/constants.h"
|
|
-#include "chrome/grit/generated_resources.h"
|
|
+#include "electron/grit/electron_resources.h"
|
|
#include "components/vector_icons/vector_icons.h"
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
#include "ui/base/metadata/metadata_impl_macros.h"
|
|
diff --git a/chrome/browser/ui/views/overlay/resize_handle_button.cc b/chrome/browser/ui/views/overlay/resize_handle_button.cc
|
|
index 375efc8f931b1bfd595265829e47c8187a8d8d39..080e652f2c3e88b9a082dbd8fef82c461311cd9c 100644
|
|
--- a/chrome/browser/ui/views/overlay/resize_handle_button.cc
|
|
+++ b/chrome/browser/ui/views/overlay/resize_handle_button.cc
|
|
@@ -6,7 +6,7 @@
|
|
|
|
#include "chrome/app/vector_icons/vector_icons.h"
|
|
#include "chrome/browser/ui/views/overlay/constants.h"
|
|
-#include "chrome/grit/generated_resources.h"
|
|
+#include "electron/grit/electron_resources.h"
|
|
#include "ui/base/hit_test.h"
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
#include "ui/base/metadata/metadata_impl_macros.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
|
|
index 8153a0b667383374d787ce105c177eda0cdf2171..e5f33a4c43f2571669dd2bef2260e548e20be9b4 100644
|
|
--- a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
|
|
+++ b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
|
|
@@ -5,7 +5,7 @@
|
|
#include "chrome/browser/ui/views/overlay/skip_ad_label_button.h"
|
|
|
|
#include "chrome/browser/ui/views/overlay/constants.h"
|
|
-#include "chrome/grit/generated_resources.h"
|
|
+#include "electron/grit/electron_resources.h"
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
#include "ui/base/metadata/metadata_impl_macros.h"
|
|
#include "ui/gfx/color_palette.h"
|
|
diff --git a/chrome/browser/ui/views/overlay/toggle_camera_button.cc b/chrome/browser/ui/views/overlay/toggle_camera_button.cc
|
|
index a3cff2dfa906aa469abd5f12f3f70f0acea0adfe..93ad732afe209a9f51756112a5aa4f7dcd6a8b2e 100644
|
|
--- a/chrome/browser/ui/views/overlay/toggle_camera_button.cc
|
|
+++ b/chrome/browser/ui/views/overlay/toggle_camera_button.cc
|
|
@@ -5,7 +5,7 @@
|
|
#include "chrome/browser/ui/views/overlay/toggle_camera_button.h"
|
|
|
|
#include "chrome/browser/ui/views/overlay/constants.h"
|
|
-#include "chrome/grit/generated_resources.h"
|
|
+#include "electron/grit/electron_resources.h"
|
|
#include "components/vector_icons/vector_icons.h"
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
#include "ui/gfx/paint_vector_icon.h"
|
|
diff --git a/chrome/browser/ui/views/overlay/toggle_microphone_button.cc b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc
|
|
index a681ba4ed2de3226b20c5e89361c4bec47dfb8ea..5cd85706018fe163d1e0a9e48e3b8a4be5dec7e9 100644
|
|
--- a/chrome/browser/ui/views/overlay/toggle_microphone_button.cc
|
|
+++ b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc
|
|
@@ -5,7 +5,7 @@
|
|
#include "chrome/browser/ui/views/overlay/toggle_microphone_button.h"
|
|
|
|
#include "chrome/browser/ui/views/overlay/constants.h"
|
|
-#include "chrome/grit/generated_resources.h"
|
|
+#include "electron/grit/electron_resources.h"
|
|
#include "components/vector_icons/vector_icons.h"
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
#include "ui/gfx/paint_vector_icon.h"
|
|
diff --git a/chrome/browser/ui/views/overlay/track_image_button.cc b/chrome/browser/ui/views/overlay/track_image_button.cc
|
|
index 4fceb3f5d802e7f01df59d1b3e9c80cc48af714a..70075228f6104b5a16f551af56eafc6829124143 100644
|
|
--- a/chrome/browser/ui/views/overlay/track_image_button.cc
|
|
+++ b/chrome/browser/ui/views/overlay/track_image_button.cc
|
|
@@ -6,7 +6,7 @@
|
|
|
|
#include "chrome/app/vector_icons/vector_icons.h"
|
|
#include "chrome/browser/ui/views/overlay/constants.h"
|
|
-#include "chrome/grit/generated_resources.h"
|
|
+#include "electron/grit/electron_resources.h"
|
|
#include "components/vector_icons/vector_icons.h"
|
|
#include "ui/base/l10n/l10n_util.h"
|
|
#include "ui/base/metadata/metadata_impl_macros.h"
|