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 664500224b99779388b5fabfface02a9ff599fdc..2be06a3e1934a73b9825953a3b897f5bc0f12540 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 79b969d83f5b2dcee7ece6c18ac9a1dcf47ac5a1..a4d38d5d0e248cf92195f649b96c77cd1a22583f 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 fc55e78614714299f8660c6e7eae2325f099e89a..45ffc1ae48396e8f91144c2a4f7dbab5ed390d24 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc @@ -14,16 +14,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" @@ -48,7 +50,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" @@ -219,7 +221,7 @@ std::unique_ptr OverlayWindowViews::Create( overlay_window->Init(std::move(params)); overlay_window->OnRootViewReady(); -#if defined(OS_WIN) +#if 0 base::string16 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 36261d8e71b00aadbecc4d5e7c5d0568742481f4..13f4f6b451cd73e67792a5d8750a89af483b2d12 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 b1272d8664afdd5c05afcb38a2f533741f210554..20f7ffa8be09b046122430c4497edce807f5d69f 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 251503cb7154c77333d85be892fe89253523a94a..052e74bb54e8b32985af7b5f870159c80ca44d87 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 d5fe4187200354d18c778591e2383d9c23f4783f..ccb0ed6fef88b7ec228055ded708637c3e094571 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"