From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Heilig Benedek 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 7c81d93e92400874b88b639fde5aaa937efdcace..7f7ca0c53dbc41e06b1c566ae605c76d05e9abcb 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 @@ -4,7 +4,7 @@ #include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h" -#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 index 6ea71449bf68081bd358c280c3c0b65af23fc97c..8e1c9e5e2cdd464ca1b5e6407b5dddccd31cdb2c 100644 --- a/chrome/browser/ui/views/overlay/close_image_button.cc +++ b/chrome/browser/ui/views/overlay/close_image_button.cc @@ -5,7 +5,7 @@ #include "chrome/browser/ui/views/overlay/close_image_button.h" #include "build/chromeos_buildflags.h" -#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 index b148e526ebb4de0111a07a971f038141889bda31..a163cdf5841186235513d9bd9d4ad7279e946d3f 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc @@ -15,16 +15,18 @@ #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/close_image_button.h" #include "chrome/browser/ui/views/overlay/playback_image_button.h" #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" @@ -49,7 +51,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" @@ -223,7 +225,7 @@ std::unique_ptr 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 c0fe1f138f441b691ac2cec2242bfc4d3bdf79ca..473eb45178549385c52fcce2e9ff0b2c77dd328d 100644 --- 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" #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 index 51ce84d8e294a35e4c9d59387bdc7df0d7828070..03dd9142eb8cb899d856f1410694b152189102ab 100644 --- 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" #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 index e5a05b7b04c9679f0b61f0b997f5326ccf881dbf..7ddd4d5f9b55a403b207445f86d78ec62cfc9cc9 100644 --- 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 @@ #include "chrome/browser/ui/views/overlay/skip_ad_label_button.h" -#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 index dbcbbabe7df945f797559b46eaa04f02162299e0..1852ff15198970a92275d65582ec19c55a125314 100644 --- 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" #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"