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 84b64238fdf3a4cb13226af338a1cb3257f3a869..3fb23fab89abdb1eca15b549c9495edd0af03472 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 a4f6f5dbbf08fc2c7e5f158d0ad170f98c80b4e4..916898ce712ce3327788882fa60048b7390731ee 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 578d17812c1eedcd262b13c1a38338876a7b455e..774b1376750694e5082b88a0f1a15328e0766985 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 5598da600a3172bde389d34537230e1502c05df1..a63d65a715de32e9ccad653bdbdf12b154265f32 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 82b18daa41184fa97da3cfca2fd80d766dfa40ba..bf00f25c64b3e126b61b2e2dc2a29fb9d46ebe7d 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"