Browse Source

chore: use //chrome resources directly (#33626)

Jeremy Rose 3 years ago
parent
commit
0168aede8e

+ 1 - 0
BUILD.gn

@@ -351,6 +351,7 @@ source_set("electron_lib") {
     "shell/common/api:mojo",
     "//base:base_static",
     "//base/allocator:buildflags",
+    "//chrome:strings",
     "//chrome/app:command_ids",
     "//chrome/app/resources:platform_locale_settings",
     "//components/autofill/core/common:features",

+ 11 - 1
electron_paks.gni

@@ -54,6 +54,8 @@ template("electron_extra_paks") {
                            ])
     output = "${invoker.output_dir}/resources.pak"
     sources = [
+      "$root_gen_dir/chrome/browser_resources.pak",
+      "$root_gen_dir/chrome/common_resources.pak",
       "$root_gen_dir/chrome/dev_ui_browser_resources.pak",
       "$root_gen_dir/components/components_resources.pak",
       "$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
@@ -70,6 +72,8 @@ template("electron_extra_paks") {
     ]
     deps = [
       "//chrome/browser:dev_ui_browser_resources",
+      "//chrome/browser:resources",
+      "//chrome/common:resources",
       "//components/resources",
       "//content:content_resources",
       "//content:dev_ui_content_resources",
@@ -173,17 +177,23 @@ template("electron_paks") {
     }
 
     source_patterns = [
+      "${root_gen_dir}/chrome/locale_settings_",
       "${root_gen_dir}/chrome/platform_locale_settings_",
+      "${root_gen_dir}/chrome/generated_resources_",
+      "${root_gen_dir}/components/strings/components_locale_settings_",
       "${root_gen_dir}/components/strings/components_strings_",
-      "${root_gen_dir}/third_party/blink/public/strings/blink_strings_",
       "${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_",
       "${root_gen_dir}/services/strings/services_strings_",
+      "${root_gen_dir}/third_party/blink/public/strings/blink_strings_",
       "${root_gen_dir}/ui/strings/app_locale_settings_",
       "${root_gen_dir}/ui/strings/ax_strings_",
       "${root_gen_dir}/ui/strings/ui_strings_",
     ]
     deps = [
+      "//chrome/app:generated_resources",
+      "//chrome/app/resources:locale_settings",
       "//chrome/app/resources:platform_locale_settings",
+      "//components/strings:components_locale_settings",
       "//components/strings:components_strings",
       "//device/bluetooth/strings",
       "//services/strings",

+ 0 - 7
electron_resources.grd

@@ -11,15 +11,8 @@
     <output filename="electron_resources.pak" type="data_package" />
   </outputs>
   <release seq="1" allow_pseudo="false">
-    <messages fallback_to_english="true">
-      <!-- TODO(deepak1556): Add translations,
-           check https://www.chromium.org/developers/design-documents/ui-localization -->
-      <part file="electron_strings.grdp" />
-    </messages>
     <includes>
       <include name="IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE" file="${target_gen_dir}/shell_devtools_discovery_page.html" use_base_dir="false" type="BINDATA" />
-      <include name="IDR_PDF_MANIFEST" file="../chrome/browser/resources/pdf/manifest.json" type="BINDATA" />
-      <include name="IDR_CRYPTOTOKEN_MANIFEST" file="../chrome/browser/resources/cryptotoken/manifest.json" type="BINDATA" />
     </includes>
   </release>
 </grit>

+ 0 - 160
electron_strings.grdp

@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<grit-part>
-  <!-- Windows Caption Buttons -->
-  <message name="IDS_APP_ACCNAME_CLOSE" desc="The accessible name for the Close button.">
-    Close
-  </message>
-  <message name="IDS_APP_ACCNAME_MINIMIZE" desc="The accessible name for the Minimize button.">
-    Minimize
-  </message>
-  <message name="IDS_APP_ACCNAME_MAXIMIZE" desc="The accessible name for the Maximize button.">
-    Maximize
-  </message>
-  <message name="IDS_APP_ACCNAME_RESTORE" desc="The accessible name for the Restore button.">
-    Restore
-  </message>
-
-  <!-- Printing Service -->
-  <message name="IDS_UTILITY_PROCESS_PRINTING_SERVICE_NAME" desc="The name of the utility process used for printing conversions.">
-    Printing Service
-  </message>
-  <message name="IDS_PRINT_INVALID_PRINTER_SETTINGS" desc="Message to display when selected printer is not reachable or its settings are invalid.">
-    The selected printer is not available or not installed correctly. <ph name="BR">&lt;br&gt;</ph> Check your printer or try selecting another printer.
-  </message>
-  <message name="IDS_DEFAULT_PRINT_DOCUMENT_TITLE" desc="Default title for a print document">
-    Untitled Document
-  </message>
-
-  <!-- Desktop Capturer API -->
-  <message name="IDS_DESKTOP_MEDIA_PICKER_SINGLE_SCREEN_NAME" desc="Name for screens in the desktop media picker UI when there is only one monitor.">
-    Entire Screen
-  </message>
-  <message name="IDS_DESKTOP_MEDIA_PICKER_MULTIPLE_SCREEN_NAME" desc="Name for screens in the desktop media picker UI when there are multiple monitors.">
-    {SCREEN_INDEX, plural, =1{Screen #} other{Screen #}}
-  </message>
-
-  <!-- File Select Helper-->
-  <message name="IDS_IMAGE_FILES" desc="The description of the image file extensions in the select file dialog.">
-    Image Files
-  </message>
-  <message name="IDS_AUDIO_FILES" desc="The description of the audio file extensions in the select file dialog.">
-    Audio Files
-  </message>
-  <message name="IDS_VIDEO_FILES" desc="The description of the video file extensions in the select file dialog.">
-    Video Files
-  </message>
-  <message name="IDS_CUSTOM_FILES" desc="The description of the custom file extensions in the select file dialog.">
-    Custom Files
-  </message>
-  <message name="IDS_DEFAULT_DOWNLOAD_FILENAME" desc="Default name for downloaded files when we have no idea what they could be.">
-    download
-  </message>
-
-  <!-- Picture-in-Picture -->
-  <if expr="is_macosx">
-    <message name="IDS_PICTURE_IN_PICTURE_TITLE_TEXT" desc="Title of the Picture-in-Picture window. This appears in the system tray and window header.">
-      Picture in Picture
-    </message>
-  </if>
-  <if expr="not is_macosx">
-    <message name="IDS_PICTURE_IN_PICTURE_TITLE_TEXT" desc="Title of the Picture-in-Picture window. This appears in the system tray and window header.">
-      Picture in picture
-    </message>
-  </if>
-  <message name="IDS_PICTURE_IN_PICTURE_PAUSE_CONTROL_TEXT" desc="Text label of the pause control button. The button appears when the user hovers over the Picture-in-Picture window and the video is currently playing.">
-    Pause
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_PLAY_CONTROL_TEXT" desc="Text label of the play control button. The button appears when the user hovers over the Picture-in-Picture window and the video is currently paused.">
-    Play
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_REPLAY_CONTROL_TEXT" desc="Text label of the replay control button. The button appears when the user hovers over the Picture-in-Picture window and the video is ended.">
-    Play from the beginning
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_BACK_TO_TAB_CONTROL_TEXT" desc="Text label of the back to tab control button. The button appears when the user hovers over the Picture-in-Picture window.">
-    Back to video player
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_MUTE_CONTROL_TEXT" desc="Text label of the mute control button. The button appears when the user hovers over the Picture-in-Picture window and the video is currently unmuted.">
-    Mute
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_UNMUTE_CONTROL_TEXT" desc="Text label of the mute control button. The button appears when the user hovers over the Picture-in-Picture window and the video is currently muted.">
-    Unmute
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_SKIP_AD_CONTROL_TEXT" desc="Text label of the skip ad control button. The button appears when the user hovers over the Picture-in-Picture window.">
-    Skip Ad
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_MUTE_MICROPHONE_TEXT" desc="Text label of the mute microphone control button. The button appears when the user hovers over the Picture-in-Picture window.">
-    Mute microphone
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_UNMUTE_MICROPHONE_TEXT" desc="Text label of the unmute microphone control button. The button appears when the user hovers over the Picture-in-Picture window.">
-    Unmute microphone
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_TURN_ON_CAMERA_TEXT" desc="Text label of the turn on camera control button. The button appears when the user hovers over the Picture-in-Picture window.">
-    Turn on camera
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_TURN_OFF_CAMERA_TEXT" desc="Text label of the turn off camera control button. The button appears when the user hovers over the Picture-in-Picture window.">
-    Turn off camera
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_HANG_UP_TEXT" desc="Text label of the hang up control button. The button appears when the user hovers over the Picture-in-Picture window.">
-    Hang up
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_CLOSE_CONTROL_TEXT" desc="Text label of the close control button. The button appears when the user hovers over the Picture-in-Picture window.">
-    Close
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_RESIZE_HANDLE_TEXT" desc="Text label of the resize handle. The button appears when the user hovers over the Picture-in-Picture window.">
-    Resize
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_PLAY_PAUSE_CONTROL_ACCESSIBLE_TEXT" desc="Accessible text label used for the controls button in the Picture-in-Picture window. The button toggles between play and pause controls.">
-    Toggle video to play or pause
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_MUTE_CONTROL_ACCESSIBLE_TEXT" desc="Accessible text label used for the controls button in the Picture-in-Picture window. The button toggles mute state.">
-    Toggle mute
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_NEXT_TRACK_CONTROL_ACCESSIBLE_TEXT" desc="Accessible text label used for the controls button in the Picture-in-Picture window. The button invokes next track action.">
-    Next track
-  </message>
-  <message name="IDS_PICTURE_IN_PICTURE_PREVIOUS_TRACK_CONTROL_ACCESSIBLE_TEXT" desc="Accessible text label used for the controls button in the Picture-in-Picture window. The button invokes previous track action.">
-    Previous track
-  </message>
-  <message name="IDS_SPELLCHECK_DICTIONARY" use_name_for_id="true">
-    en-US
-  </message>
-  <message name="IDS_ACCEPT_LANGUAGES" use_name_for_id="true">
-    en-US,en
-  </message>
-  <if expr="is_win">
-    <message name="IDS_UTILITY_PROCESS_UTILITY_WIN_NAME" desc="The name of the utility process used to handle Windows utility operations.">
-      Windows Utilities
-    </message>
-  </if>
-  <message name="IDS_DOWNLOAD_MORE_ACTIONS"
-          desc="Tooltip of a button on the downloads page that shows a menu with actions like 'Open downloads folder' or 'Clear all'">
-    More actions
-  </message>
-  <!-- Badging -->
-  <message name="IDS_SATURATED_BADGE_CONTENT" desc="The content to display when the application's badge is too large to display to indicate that the badge is more than a given maximum. This string should be as short as possible, preferably only one character beyond the content">
-    <ph name="MAXIMUM_VALUE">$1<ex>99</ex></ph>+
-  </message>
-  <message name="IDS_BADGE_UNREAD_NOTIFICATIONS_SATURATED" desc="The accessibility text which will be read by a screen reader when the notification count is too large to display (e.g. greater than 99).">
-    {MAX_UNREAD_NOTIFICATIONS, plural, =1 {More than 1 unread notification} other {More than # unread notifications}}
-  </message>
-  <message name="IDS_BADGE_UNREAD_NOTIFICATIONS_UNSPECIFIED" desc="The accessibility text which will be read by a screen reader when there are some unspecified number of notifications, or user attention is required">
-    Unread Notifications
-  </message>
-  <message name="IDS_BADGE_UNREAD_NOTIFICATIONS" desc="The accessibility text which will be read by a screen reader when there are notifcatications">
-    {UNREAD_NOTIFICATIONS, plural, =1 {1 Unread Notification} other {# Unread Notifications}}
-  </message>
-  <message name="IDS_HID_CHOOSER_ITEM_WITHOUT_NAME" desc="User option displaying the device IDs for a Human Interface Device (HID) without a device name.">
-        Unknown Device (<ph name="DEVICE_ID">$1<ex>1234:abcd</ex></ph>) </message>
-  <if expr="is_win">
-    <then>
-      <message name="IDS_AX_UNLABELED_IMAGE_ROLE_DESCRIPTION" desc="Accessibility role description for a graphic (image) on a web page or PDF that does not have a description for blind users." is_accessibility_with_no_ui="true">
-        Unlabeled graphic
-      </message>
-    </then>
-    <else>
-      <message name="IDS_AX_UNLABELED_IMAGE_ROLE_DESCRIPTION" desc="Accessibility role description for an image on a web page or PDF that does not have a description for blind users." is_accessibility_with_no_ui="true">
-        Unlabeled image
-      </message>
-    </else>
-  </if>
-</grit-part>

+ 0 - 2
patches/chromium/.patches

@@ -54,7 +54,6 @@ feat_add_set_theme_source_to_allow_apps_to.patch
 add_webmessageportconverter_entangleandinjectmessageportchannel.patch
 ignore_rc_check.patch
 remove_usage_of_incognito_apis_in_the_spellchecker.patch
-chore_use_electron_resources_not_chrome_for_spellchecker.patch
 allow_disabling_blink_scheduler_throttling_per_renderview.patch
 hack_plugin_response_interceptor_to_point_to_electron.patch
 feat_add_support_for_overriding_the_base_spellchecker_download_url.patch
@@ -77,7 +76,6 @@ skip_atk_toolchain_check.patch
 worker_feat_add_hook_to_notify_script_ready.patch
 chore_provide_iswebcontentscreationoverridden_with_full_params.patch
 fix_properly_honor_printing_page_ranges.patch
-fix_use_electron_generated_resources.patch
 chore_expose_v8_initialization_isolate_callbacks.patch
 export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch
 fix_export_zlib_symbols.patch

+ 1 - 1
patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch

@@ -33,7 +33,7 @@ index 1f86073736f849e797e029678bc212ce96ba0bd9..b8abc10e48bdff0f4e6c3f8e1c4927bc
          "//base",
          "//build:branding_buildflags",
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index a99ce094addf69f21f3c42690defc445eff8fa05..797c8add1af6df1142179388ef1b7a5bf977d527 100644
+index 72c3a67361eaecbe7349db00bbd3b7c1deaced69..16c923640286837e93f0e7dddefc1d91740238c8 100644
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
 @@ -4518,7 +4518,7 @@ static_library("browser") {

+ 0 - 58
patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch

@@ -1,58 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Samuel Attard <[email protected]>
-Date: Wed, 23 Oct 2019 14:17:18 -0700
-Subject: chore: use electron resources not chrome for spellchecker
-
-spellchecker uses a few IDS_ resources.  We need to load these from
-Electrons grit header instead of Chromes
-
-diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index 72c3a67361eaecbe7349db00bbd3b7c1deaced69..a99ce094addf69f21f3c42690defc445eff8fa05 100644
---- a/chrome/browser/BUILD.gn
-+++ b/chrome/browser/BUILD.gn
-@@ -7135,6 +7135,7 @@ static_library("browser") {
-     deps += [
-       "//components/spellcheck/browser",
-       "//components/spellcheck/common",
-+      "//electron:resources",
-     ]
- 
-     if (!is_android) {
-diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
-index 7c3b6a69acb16186add5d467dbc22360d90d46d4..703e2ce60f4f35f9c71e8b503ffd62f9ea8f365a 100644
---- a/chrome/browser/spellchecker/spellcheck_factory.cc
-+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
-@@ -7,7 +7,7 @@
- #include "build/build_config.h"
- #include "chrome/browser/profiles/incognito_helpers.h"
- #include "chrome/browser/spellchecker/spellcheck_service.h"
--#include "chrome/grit/locale_settings.h"
-+#include "electron/grit/electron_resources.h"
- #include "components/keyed_service/content/browser_context_dependency_manager.h"
- #include "components/pref_registry/pref_registry_syncable.h"
- #include "components/prefs/pref_service.h"
-diff --git a/components/language/core/browser/BUILD.gn b/components/language/core/browser/BUILD.gn
-index fdba4ca90882656d6ba369dae48d5dfc13991cb8..fb3b759362275aafd4ed01a7865a4dd0dfaad727 100644
---- a/components/language/core/browser/BUILD.gn
-+++ b/components/language/core/browser/BUILD.gn
-@@ -30,6 +30,7 @@ static_library("browser") {
-     "//components/pref_registry",
-     "//components/prefs",
-     "//components/strings",
-+    "//electron:resources",
-     "//ui/base",
-   ]
- }
-diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc
-index 26f86d67c32b2a022698ae5ea5509912d2ccfacb..d48844d49308d67ee7bfa823335c7443173badbe 100644
---- a/components/language/core/browser/language_prefs.cc
-+++ b/components/language/core/browser/language_prefs.cc
-@@ -22,7 +22,7 @@
- #include "components/pref_registry/pref_registry_syncable.h"
- #include "components/prefs/pref_service.h"
- #include "components/prefs/scoped_user_pref_update.h"
--#include "components/strings/grit/components_locale_settings.h"
-+#include "electron/grit/electron_resources.h"
- #include "ui/base/l10n/l10n_util.h"
- 
- namespace language {

+ 1 - 10
patches/chromium/desktop_media_list.patch

@@ -82,18 +82,9 @@ index 1e4a652634fbde2ca9a256baca840bbc5a0e001f..546f5bc3a2f79035f0eec196d9e704b8
    const Source& GetSource(int index) const override;
    DesktopMediaList::Type GetMediaListType() const override;
 diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
-index 6d8c9d940bb4488ffedc1eb8c543c065bb3953c9..2026b926eee56f6b235963b23ab86b2743eaed90 100644
+index 6d8c9d940bb4488ffedc1eb8c543c065bb3953c9..d5092cb0245a4b8dc26073741f0bc6657b943bdd 100644
 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
 +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
-@@ -18,7 +18,7 @@
- #include "build/build_config.h"
- #include "build/chromeos_buildflags.h"
- #include "chrome/browser/media/webrtc/desktop_media_list.h"
--#include "chrome/grit/generated_resources.h"
-+#include "electron/grit/electron_resources.h"
- #include "content/public/browser/browser_task_traits.h"
- #include "content/public/browser/browser_thread.h"
- #include "content/public/common/content_features.h"
 @@ -127,8 +127,9 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) {
  #endif  // BUILDFLAG(IS_WIN)
  

+ 0 - 53
patches/chromium/fix_use_electron_generated_resources.patch

@@ -1,53 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Shelley Vohr <[email protected]>
-Date: Thu, 24 Sep 2020 11:10:41 -0700
-Subject: fix: use electron generated resources
-
-This patch fixes a few instances where we need to use Electron generated
-resources for IDS strings, or the IDs will be wrong and cause DCHECKS
-as they will loaded as empty strings.
-
-* IDS_UTILITY_PROCESS_UTILITY_WIN_NAME on Windows
-* IDR_PDF_MANIFEST on Linux
-* IDS_UTILITY_PROCESS_PRINTING_SERVICE_NAME on Windows
-
-diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc
-index ccb9d3fb018b4153cfebad8b87579dd5005398e9..5ee9583dddcceed80c7a6e0fa6a0365dbd6c9a6a 100644
---- a/chrome/browser/pdf/pdf_extension_util.cc
-+++ b/chrome/browser/pdf/pdf_extension_util.cc
-@@ -11,8 +11,7 @@
- #include "build/chromeos_buildflags.h"
- #include "chrome/browser/browser_process.h"
- #include "chrome/common/chrome_content_client.h"
--#include "chrome/grit/browser_resources.h"
--#include "chrome/grit/generated_resources.h"
-+#include "electron/grit/electron_resources.h"
- #include "components/strings/grit/components_strings.h"
- #include "components/zoom/page_zoom_constants.h"
- #include "ui/base/l10n/l10n_util.h"
-diff --git a/chrome/browser/printing/printing_service.cc b/chrome/browser/printing/printing_service.cc
-index 6d18517898c11c6a628cec2eade57fe845827b3d..a21f52e8a3c6f80d69b27faae4b77700fdd09e35 100644
---- a/chrome/browser/printing/printing_service.cc
-+++ b/chrome/browser/printing/printing_service.cc
-@@ -5,7 +5,7 @@
- #include "chrome/browser/printing/printing_service.h"
- 
- #include "base/no_destructor.h"
--#include "chrome/grit/generated_resources.h"
-+#include "electron/grit/electron_resources.h"
- #include "chrome/services/printing/public/mojom/printing_service.mojom.h"
- #include "content/public/browser/service_process_host.h"
- 
-diff --git a/chrome/browser/win/icon_reader_service.cc b/chrome/browser/win/icon_reader_service.cc
-index d5497a7e26cdb66c7c074bc509e2bfec7d7875cd..62d2f555253eef903bd04ff1a0ad37d1470309e0 100644
---- a/chrome/browser/win/icon_reader_service.cc
-+++ b/chrome/browser/win/icon_reader_service.cc
-@@ -4,7 +4,7 @@
- 
- #include "chrome/browser/win/icon_reader_service.h"
- 
--#include "chrome/grit/generated_resources.h"
-+#include "electron/grit/electron_resources.h"
- #include "chrome/services/util_win/public/mojom/util_read_icon.mojom.h"
- #include "content/public/browser/service_process_host.h"
- 

+ 6 - 163
patches/chromium/picture-in-picture.patch

@@ -8,50 +8,11 @@ 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 7bc8d118f87b91baf1c3bd1d34374996ab1d3638..2d2c1c86f311b07f0c2b09d5a4c082cc5599600c 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/color/chrome_color_id.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/base/models/image_model.h"
-diff --git a/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc
-index d566dbf99ea1164c6a8407026a9839218a6ba1fb..239cd53d70c547c79214988a82efdc8c472d553c 100644
---- a/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc
-+++ b/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc
-@@ -5,7 +5,7 @@
- #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
- 
- #include "chrome/browser/ui/color/chrome_color_id.h"
--#include "chrome/grit/generated_resources.h"
-+#include "electron/grit/electron_resources.h"
- #include "third_party/skia/include/core/SkColor.h"
- #include "ui/base/cursor/cursor.h"
- #include "ui/base/l10n/l10n_util.h"
-diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc
-index a3d9c0f03c8ade2553bad5721d4e15e6fd658074..b3b043cbf9144013bf7903121575b31b348ea87e 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/color/chrome_color_id.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/base/models/image_model.h"
 diff --git a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc
-index 3309906bcae27ba89d73ce4fba49843a10cd31f6..9f828f70606238186b35b5e1ca8751134eaf3c33 100644
+index 3309906bcae27ba89d73ce4fba49843a10cd31f6..987917a440480130d35f34f85c27ff7c27632fd9 100644
 --- a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc
 +++ b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc
-@@ -15,24 +15,28 @@
+@@ -15,15 +15,19 @@
  #include "base/timer/timer.h"
  #include "build/build_config.h"
  #include "chrome/app/vector_icons/vector_icons.h"
@@ -71,16 +32,6 @@ index 3309906bcae27ba89d73ce4fba49843a10cd31f6..9f828f70606238186b35b5e1ca875113
  #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/resize_handle_button.h"
--#include "chrome/grit/generated_resources.h"
- #include "components/omnibox/browser/location_bar_model_impl.h"
- #include "components/vector_icons/vector_icons.h"
- #include "content/public/browser/document_picture_in_picture_window_controller.h"
- #include "content/public/browser/picture_in_picture_window_controller.h"
- #include "content/public/browser/web_contents.h"
-+#include "electron/grit/electron_resources.h"
- #include "content/public/common/content_constants.h"
- #include "media/base/media_switches.h"
- #include "media/base/video_util.h"
 @@ -57,7 +61,7 @@
  #include "ui/aura/window.h"
  #endif
@@ -161,24 +112,11 @@ index b2b178ccadce82f8d4ec8e5a6dafe1c67bcecd74..603d82a461c4c443ac26c85a46fbd866
  
    // OverlayWindowViews
    bool ControlsHitTestContainsPoint(const gfx::Point& point) override;
-diff --git a/chrome/browser/ui/views/overlay/hang_up_button.cc b/chrome/browser/ui/views/overlay/hang_up_button.cc
-index 75bfe0f7a4d759f677cad5c365fa7f98121d54de..cb251381f1c77ad01d4906132f3d68865aaace10 100644
---- a/chrome/browser/ui/views/overlay/hang_up_button.cc
-+++ b/chrome/browser/ui/views/overlay/hang_up_button.cc
-@@ -6,7 +6,7 @@
- 
- #include "chrome/browser/ui/color/chrome_color_id.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/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
-index 850b34e3b40f7ff1848c66158976db079e0853bd..105dbc3661eb2710b2f10ca6584e85c36ad14705 100644
+index 850b34e3b40f7ff1848c66158976db079e0853bd..74178fd4752e9c469d50ccafda61157acd9edd56 100644
 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
 +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
-@@ -14,13 +14,15 @@
+@@ -14,9 +14,11 @@
  #include "base/time/time.h"
  #include "base/timer/timer.h"
  #include "build/build_config.h"
@@ -186,15 +124,10 @@ index 850b34e3b40f7ff1848c66158976db079e0853bd..105dbc3661eb2710b2f10ca6584e85c3
  #include "chrome/browser/profiles/profile.h"
  #include "chrome/browser/ui/browser.h"
  #include "chrome/browser/ui/browser_finder.h"
--#include "chrome/grit/generated_resources.h"
 +#endif
+ #include "chrome/grit/generated_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"
-+#include "electron/grit/electron_resources.h"
- #include "ui/base/hit_test.h"
- #include "ui/display/display.h"
- #include "ui/display/screen.h"
 @@ -36,7 +38,7 @@
  #include "ui/aura/window.h"
  #endif
@@ -204,86 +137,8 @@ index 850b34e3b40f7ff1848c66158976db079e0853bd..105dbc3661eb2710b2f10ca6584e85c3
  #include "chrome/browser/shell_integration_win.h"
  #include "ui/aura/window.h"
  #include "ui/aura/window_tree_host.h"
-diff --git a/chrome/browser/ui/views/overlay/playback_image_button.cc b/chrome/browser/ui/views/overlay/playback_image_button.cc
-index cb1621a9deefcec601d7537e2cc2fbd24e5f7f64..2d74ab12e1eaf77a6f9dde13e894172d6835e061 100644
---- a/chrome/browser/ui/views/overlay/playback_image_button.cc
-+++ b/chrome/browser/ui/views/overlay/playback_image_button.cc
-@@ -7,7 +7,7 @@
- #include "chrome/app/vector_icons/vector_icons.h"
- #include "chrome/browser/ui/color/chrome_color_id.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 8bf217b9b0c2bd22d6940c24c58eccb9865c5286..91f061a1243135db475371dda00c2fe054f4e8e3 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/color/chrome_color_id.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 51c7db1bfbd3c03b9cb2786c8c7482b33e3aca0b..2890f7420d2fd258f84019963eab6c9606e228db 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/color/chrome_color_id.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 20b82ff4dcf7fef3315b2b47bb480446509c6541..244a50e57b6c12680405c92f0ecbdbdb8bcfcb4f 100644
---- a/chrome/browser/ui/views/overlay/toggle_camera_button.cc
-+++ b/chrome/browser/ui/views/overlay/toggle_camera_button.cc
-@@ -6,7 +6,7 @@
- 
- #include "chrome/browser/ui/color/chrome_color_id.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/toggle_microphone_button.cc b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc
-index 1a1edb6321490fdbf5cd347cb3d2cb9a6a5b1080..1e959cf1c8fe356ab4427e4bf4f8da1028f4575f 100644
---- a/chrome/browser/ui/views/overlay/toggle_microphone_button.cc
-+++ b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc
-@@ -6,7 +6,7 @@
- 
- #include "chrome/browser/ui/color/chrome_color_id.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/track_image_button.cc b/chrome/browser/ui/views/overlay/track_image_button.cc
-index 5e136488b37887e9523ac04a9ff4ccdfaf96c104..24899f4c2b6fe66b96a6728bf747f1aad66f20a9 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/color/chrome_color_id.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/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
-index 6d2744b673ecb31464d4aa9b0d11177892c030f4..f9ea66415b85ce385be429ead5e04c8a96dc31c4 100644
+index 6d2744b673ecb31464d4aa9b0d11177892c030f4..1dd75ec581ecd67e04a8f1cf1e43bce70eaa9380 100644
 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
 +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
 @@ -15,9 +15,11 @@
@@ -298,18 +153,6 @@ index 6d2744b673ecb31464d4aa9b0d11177892c030f4..f9ea66415b85ce385be429ead5e04c8a
  #include "chrome/browser/ui/color/chrome_color_id.h"
  #include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h"
  #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
-@@ -29,10 +31,10 @@
- #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 "components/vector_icons/vector_icons.h"
- #include "content/public/browser/video_picture_in_picture_window_controller.h"
- #include "content/public/browser/web_contents.h"
-+#include "electron/grit/electron_resources.h"
- #include "media/base/media_switches.h"
- #include "media/base/video_util.h"
- #include "third_party/skia/include/core/SkColor.h"
 @@ -56,7 +58,7 @@
  #include "ui/aura/window.h"
  #endif

+ 4 - 4
patches/chromium/printing.patch

@@ -69,7 +69,7 @@ index 650c78f16c812170aeda99d75300ff88f47347a0..c33ce445a23f97a744db3a4ac30ef471
      NEW_DOC,
  
 diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
-index b11b8f34cf7e252a8d22e167d6555f3aa432e5c4..a5950a9d4c823e3df145c365bb499c0163fe3e77 100644
+index b11b8f34cf7e252a8d22e167d6555f3aa432e5c4..3a42aa2a6cde698a75349e573a34b1328fc9c11c 100644
 --- a/chrome/browser/printing/print_job_worker.cc
 +++ b/chrome/browser/printing/print_job_worker.cc
 @@ -20,7 +20,6 @@
@@ -84,7 +84,7 @@ index b11b8f34cf7e252a8d22e167d6555f3aa432e5c4..a5950a9d4c823e3df145c365bb499c01
  #include "content/public/browser/global_routing_id.h"
  #include "content/public/browser/render_frame_host.h"
  #include "content/public/browser/web_contents.h"
-+#include "electron/grit/electron_resources.h"
++#include "chrome/grit/generated_resources.h"
  #include "printing/backend/print_backend.h"
  #include "printing/buildflags/buildflags.h"
  #include "printing/mojom/print.mojom.h"
@@ -127,7 +127,7 @@ index 56232bf979e90a01bb580c0a1972ae0860d994e9..96e05b5cd4b556a6ddb41664b5ff999b
  
  void PrintJobWorkerOop::UnregisterServiceManagerClient() {
 diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
-index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..abd7e5e5832919cbd06b3b337f54d79d284a4247 100644
+index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..e641ba582e01bc02b6f3d6f28cfcd91a89f5489f 100644
 --- a/chrome/browser/printing/print_view_manager_base.cc
 +++ b/chrome/browser/printing/print_view_manager_base.cc
 @@ -30,10 +30,10 @@
@@ -147,7 +147,7 @@ index 2eb81c133b94fd237e4eaa60472c08515fd6d01e..abd7e5e5832919cbd06b3b337f54d79d
  #include "content/public/browser/render_process_host.h"
  #include "content/public/browser/render_view_host.h"
  #include "content/public/browser/web_contents.h"
-+#include "electron/grit/electron_resources.h"
++#include "chrome/grit/generated_resources.h"
  #include "mojo/public/cpp/system/buffer.h"
  #include "printing/buildflags/buildflags.h"
  #include "printing/metafile_skia.h"

+ 0 - 1
shell/browser/electron_browser_client.cc

@@ -54,7 +54,6 @@
 #include "content/public/common/url_constants.h"
 #include "crypto/crypto_buildflags.h"
 #include "electron/buildflags/buildflags.h"
-#include "electron/grit/electron_resources.h"
 #include "electron/shell/common/api/api.mojom.h"
 #include "extensions/browser/api/messaging/messaging_api_message_filter.h"
 #include "mojo/public/cpp/bindings/binder_map.h"

+ 1 - 1
shell/browser/extensions/electron_extension_system.cc

@@ -15,6 +15,7 @@
 #include "base/path_service.h"
 #include "base/task/post_task.h"
 #include "chrome/common/chrome_paths.h"
+#include "chrome/grit/browser_resources.h"
 #include "components/value_store/value_store_factory_impl.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_task_traits.h"
@@ -23,7 +24,6 @@
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/notification_source.h"
 #include "electron/buildflags/buildflags.h"
-#include "electron/grit/electron_resources.h"
 #include "extensions/browser/api/app_runtime/app_runtime_api.h"
 #include "extensions/browser/extension_registry.h"
 #include "extensions/browser/info_map.h"

+ 1 - 1
shell/browser/file_select_helper.cc

@@ -22,6 +22,7 @@
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/platform_util.h"
 #include "chrome/common/pref_names.h"
+#include "chrome/grit/generated_resources.h"
 #include "components/prefs/pref_service.h"
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
@@ -31,7 +32,6 @@
 #include "content/public/browser/render_view_host.h"
 #include "content/public/browser/render_widget_host_view.h"
 #include "content/public/browser/web_contents.h"
-#include "electron/grit/electron_resources.h"
 #include "net/base/filename_util.h"
 #include "net/base/mime_util.h"
 #include "shell/browser/api/electron_api_web_contents.h"

+ 1 - 1
shell/browser/hid/hid_chooser_context.cc

@@ -13,10 +13,10 @@
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
+#include "chrome/grit/generated_resources.h"
 #include "components/content_settings/core/common/content_settings_types.h"
 #include "components/prefs/pref_service.h"
 #include "content/public/browser/device_service.h"
-#include "electron/grit/electron_resources.h"
 #include "services/device/public/cpp/hid/hid_blocklist.h"
 #include "services/device/public/cpp/hid/hid_switches.h"
 #include "shell/browser/web_contents_permission_helper.h"