diff options
| author | Shokara Kou <kou@13f0.net> | 2022-06-08 08:43:41 -0400 |
|---|---|---|
| committer | Shokara Kou <kou@13f0.net> | 2022-06-08 09:01:47 -0400 |
| commit | 45b7fe33fcca66111d3f1bba4b75e5438362dd80 (patch) | |
| tree | 5aa46761f97d2329fabf4c5e2a8ab9dca36db3e8 /www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch | |
| parent | 8fe8e03bb8c52fac64b52839d7af4f47b718f405 (diff) | |
update ugc to 100.0.4896.75
Diffstat (limited to 'www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch')
| -rw-r--r-- | www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch index 5b52596..37a4834 100644 --- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch +++ b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | --- chrome/browser/chrome_content_browser_client.cc.orig | 1 | --- a/chrome/browser/chrome_content_browser_client.cc |
| 2 | +++ chrome/browser/chrome_content_browser_client.cc | 2 | +++ b/chrome/browser/chrome_content_browser_client.cc |
| 3 | @@ -6001,7 +6001,7 @@ bool ChromeContentBrowserClient::ShouldA | 3 | @@ -6068,7 +6068,7 @@ bool ChromeContentBrowserClient::ShouldA |
| 4 | const url::Origin& embedder_origin, | 4 | const url::Origin& embedder_origin, |
| 5 | const content::PepperPluginInfo& plugin_info) { | 5 | const content::PepperPluginInfo& plugin_info) { |
| 6 | #if BUILDFLAG(ENABLE_PDF) | 6 | #if BUILDFLAG(ENABLE_PDF) |
| @@ -9,8 +9,8 @@ | |||
| 9 | return IsPdfInternalPluginAllowedOrigin(embedder_origin); | 9 | return IsPdfInternalPluginAllowedOrigin(embedder_origin); |
| 10 | } | 10 | } |
| 11 | #endif // BUILDFLAG(ENABLE_PDF) | 11 | #endif // BUILDFLAG(ENABLE_PDF) |
| 12 | --- chrome/browser/pdf/pdf_extension_util.cc.orig | 12 | --- a/chrome/browser/pdf/pdf_extension_util.cc |
| 13 | +++ chrome/browser/pdf/pdf_extension_util.cc | 13 | +++ b/chrome/browser/pdf/pdf_extension_util.cc |
| 14 | @@ -170,7 +170,7 @@ std::string GetManifest() { | 14 | @@ -170,7 +170,7 @@ std::string GetManifest() { |
| 15 | DCHECK(manifest_contents.find(kNameTag) != std::string::npos); | 15 | DCHECK(manifest_contents.find(kNameTag) != std::string::npos); |
| 16 | base::ReplaceFirstSubstringAfterOffset( | 16 | base::ReplaceFirstSubstringAfterOffset( |
| @@ -20,9 +20,9 @@ | |||
| 20 | 20 | ||
| 21 | return manifest_contents; | 21 | return manifest_contents; |
| 22 | } | 22 | } |
| 23 | --- chrome/browser/plugins/pdf_iframe_navigation_throttle_unittest.cc.orig | 23 | --- a/chrome/browser/plugins/pdf_iframe_navigation_throttle_unittest.cc |
| 24 | +++ chrome/browser/plugins/pdf_iframe_navigation_throttle_unittest.cc | 24 | +++ b/chrome/browser/plugins/pdf_iframe_navigation_throttle_unittest.cc |
| 25 | @@ -65,7 +65,7 @@ class PDFIFrameNavigationThrottleTest : | 25 | @@ -67,7 +67,7 @@ class PDFIFrameNavigationThrottleTest : |
| 26 | // Register a fake PDF Viewer plugin into our plugin service. | 26 | // Register a fake PDF Viewer plugin into our plugin service. |
| 27 | content::WebPluginInfo info; | 27 | content::WebPluginInfo info; |
| 28 | info.name = | 28 | info.name = |
| @@ -31,8 +31,8 @@ | |||
| 31 | info.mime_types.push_back(content::WebPluginMimeType( | 31 | info.mime_types.push_back(content::WebPluginMimeType( |
| 32 | kPDFMimeType, "pdf", "Fake PDF description")); | 32 | kPDFMimeType, "pdf", "Fake PDF description")); |
| 33 | plugin_service->RegisterInternalPlugin(info, true); | 33 | plugin_service->RegisterInternalPlugin(info, true); |
| 34 | --- chrome/browser/plugins/plugin_prefs.cc.orig | 34 | --- a/chrome/browser/plugins/plugin_prefs.cc |
| 35 | +++ chrome/browser/plugins/plugin_prefs.cc | 35 | +++ b/chrome/browser/plugins/plugin_prefs.cc |
| 36 | @@ -40,7 +40,7 @@ bool IsPDFViewerPlugin(const std::u16str | 36 | @@ -40,7 +40,7 @@ bool IsPDFViewerPlugin(const std::u16str |
| 37 | // plugin, which is also used for Print Preview. Note that only the PDF viewer | 37 | // plugin, which is also used for Print Preview. Note that only the PDF viewer |
| 38 | // and Print Preview can create the internal PDF plugin in the first place. | 38 | // and Print Preview can create the internal PDF plugin in the first place. |
| @@ -42,8 +42,8 @@ | |||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | } // namespace | 44 | } // namespace |
| 45 | --- chrome/browser/plugins/plugin_prefs_unittest.cc.orig | 45 | --- a/chrome/browser/plugins/plugin_prefs_unittest.cc |
| 46 | +++ chrome/browser/plugins/plugin_prefs_unittest.cc | 46 | +++ b/chrome/browser/plugins/plugin_prefs_unittest.cc |
| 47 | @@ -24,11 +24,11 @@ class PluginPrefsTest : public ::testing | 47 | @@ -24,11 +24,11 @@ class PluginPrefsTest : public ::testing |
| 48 | TEST_F(PluginPrefsTest, AlwaysOpenPdfExternally) { | 48 | TEST_F(PluginPrefsTest, AlwaysOpenPdfExternally) { |
| 49 | EXPECT_EQ(PluginPrefs::NO_POLICY, | 49 | EXPECT_EQ(PluginPrefs::NO_POLICY, |
| @@ -58,8 +58,8 @@ | |||
| 58 | - ChromeContentClient::kPDFExtensionPluginName))); | 58 | - ChromeContentClient::kPDFExtensionPluginName))); |
| 59 | + ChromeContentClient::GetPDFExtensionPluginName()))); | 59 | + ChromeContentClient::GetPDFExtensionPluginName()))); |
| 60 | } | 60 | } |
| 61 | --- chrome/browser/resources/plugin_metadata/plugins_chromeos.json.orig | 61 | --- a/chrome/browser/resources/plugin_metadata/plugins_chromeos.json |
| 62 | +++ chrome/browser/resources/plugin_metadata/plugins_chromeos.json | 62 | +++ b/chrome/browser/resources/plugin_metadata/plugins_chromeos.json |
| 63 | @@ -44,6 +44,19 @@ | 63 | @@ -44,6 +44,19 @@ |
| 64 | "name": "Chrome PDF Viewer", | 64 | "name": "Chrome PDF Viewer", |
| 65 | "group_name_matcher": "*Chrome PDF Viewer*" | 65 | "group_name_matcher": "*Chrome PDF Viewer*" |
| @@ -100,8 +100,8 @@ | |||
| 100 | "chromium-pdf-plugin": { | 100 | "chromium-pdf-plugin": { |
| 101 | "mime_types": [ | 101 | "mime_types": [ |
| 102 | ], | 102 | ], |
| 103 | --- chrome/browser/resources/plugin_metadata/plugins_linux.json.orig | 103 | --- a/chrome/browser/resources/plugin_metadata/plugins_linux.json |
| 104 | +++ chrome/browser/resources/plugin_metadata/plugins_linux.json | 104 | +++ b/chrome/browser/resources/plugin_metadata/plugins_linux.json |
| 105 | @@ -36,6 +36,19 @@ | 105 | @@ -36,6 +36,19 @@ |
| 106 | "name": "Chrome PDF Viewer", | 106 | "name": "Chrome PDF Viewer", |
| 107 | "group_name_matcher": "*Chrome PDF Viewer*" | 107 | "group_name_matcher": "*Chrome PDF Viewer*" |
| @@ -142,8 +142,8 @@ | |||
| 142 | "chromium-pdf-plugin": { | 142 | "chromium-pdf-plugin": { |
| 143 | "mime_types": [ | 143 | "mime_types": [ |
| 144 | ], | 144 | ], |
| 145 | --- chrome/browser/resources/plugin_metadata/plugins_mac.json.orig | 145 | --- a/chrome/browser/resources/plugin_metadata/plugins_mac.json |
| 146 | +++ chrome/browser/resources/plugin_metadata/plugins_mac.json | 146 | +++ b/chrome/browser/resources/plugin_metadata/plugins_mac.json |
| 147 | @@ -33,6 +33,19 @@ | 147 | @@ -33,6 +33,19 @@ |
| 148 | "name": "Chrome PDF Viewer", | 148 | "name": "Chrome PDF Viewer", |
| 149 | "group_name_matcher": "*Chrome PDF Viewer*" | 149 | "group_name_matcher": "*Chrome PDF Viewer*" |
| @@ -184,8 +184,8 @@ | |||
| 184 | "chromium-pdf-plugin": { | 184 | "chromium-pdf-plugin": { |
| 185 | "mime_types": [ | 185 | "mime_types": [ |
| 186 | ], | 186 | ], |
| 187 | --- chrome/browser/resources/plugin_metadata/plugins_win.json.orig | 187 | --- a/chrome/browser/resources/plugin_metadata/plugins_win.json |
| 188 | +++ chrome/browser/resources/plugin_metadata/plugins_win.json | 188 | +++ b/chrome/browser/resources/plugin_metadata/plugins_win.json |
| 189 | @@ -33,6 +33,19 @@ | 189 | @@ -33,6 +33,19 @@ |
| 190 | "name": "Chrome PDF Viewer", | 190 | "name": "Chrome PDF Viewer", |
| 191 | "group_name_matcher": "*Chrome PDF Viewer*" | 191 | "group_name_matcher": "*Chrome PDF Viewer*" |
| @@ -226,8 +226,8 @@ | |||
| 226 | "chromium-pdf-plugin": { | 226 | "chromium-pdf-plugin": { |
| 227 | "mime_types": [ | 227 | "mime_types": [ |
| 228 | ], | 228 | ], |
| 229 | --- chrome/browser/ungoogled_flag_choices.h.orig | 229 | --- a/chrome/browser/ungoogled_flag_choices.h |
| 230 | +++ chrome/browser/ungoogled_flag_choices.h | 230 | +++ b/chrome/browser/ungoogled_flag_choices.h |
| 231 | @@ -34,4 +34,9 @@ const FeatureEntry::Choice kScrollEventC | 231 | @@ -34,4 +34,9 @@ const FeatureEntry::Choice kScrollEventC |
| 232 | "scroll-tabs", | 232 | "scroll-tabs", |
| 233 | "never"} | 233 | "never"} |
| @@ -238,9 +238,9 @@ | |||
| 238 | + {"Microsoft Edge", switches::kPDFPluginName, "edge"}, | 238 | + {"Microsoft Edge", switches::kPDFPluginName, "edge"}, |
| 239 | +}; | 239 | +}; |
| 240 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ | 240 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ |
| 241 | --- chrome/browser/ungoogled_flag_entries.h.orig | 241 | --- a/chrome/browser/ungoogled_flag_entries.h |
| 242 | +++ chrome/browser/ungoogled_flag_entries.h | 242 | +++ b/chrome/browser/ungoogled_flag_entries.h |
| 243 | @@ -40,4 +40,8 @@ | 243 | @@ -36,4 +36,8 @@ |
| 244 | "Scroll switches tab", | 244 | "Scroll switches tab", |
| 245 | "Switch to the left/right tab if the wheel-scroll happens over the tabstrip, or the empty space beside the tabstrip. ungoogled-chromium flag.", | 245 | "Switch to the left/right tab if the wheel-scroll happens over the tabstrip, or the empty space beside the tabstrip. ungoogled-chromium flag.", |
| 246 | kOsDesktop, MULTI_VALUE_TYPE(kScrollEventChangesTab)}, | 246 | kOsDesktop, MULTI_VALUE_TYPE(kScrollEventChangesTab)}, |
| @@ -249,9 +249,9 @@ | |||
| 249 | + "Sets the internal PDF viewer plugin name. Useful for sites that probe JS API navigator.plugins. ungoogled-chromium flag.", | 249 | + "Sets the internal PDF viewer plugin name. Useful for sites that probe JS API navigator.plugins. ungoogled-chromium flag.", |
| 250 | + kOsDesktop, MULTI_VALUE_TYPE(kPDFPluginNameChoices)}, | 250 | + kOsDesktop, MULTI_VALUE_TYPE(kPDFPluginNameChoices)}, |
| 251 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ | 251 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ |
| 252 | --- chrome/common/BUILD.gn.orig | 252 | --- a/chrome/common/BUILD.gn |
| 253 | +++ chrome/common/BUILD.gn | 253 | +++ b/chrome/common/BUILD.gn |
| 254 | @@ -249,6 +249,7 @@ static_library("common") { | 254 | @@ -246,6 +246,7 @@ static_library("common") { |
| 255 | "//components/no_state_prefetch/common", | 255 | "//components/no_state_prefetch/common", |
| 256 | "//components/no_state_prefetch/common:mojo_bindings", | 256 | "//components/no_state_prefetch/common:mojo_bindings", |
| 257 | "//components/page_load_metrics/common:common", | 257 | "//components/page_load_metrics/common:common", |
| @@ -259,9 +259,9 @@ | |||
| 259 | ] | 259 | ] |
| 260 | 260 | ||
| 261 | if (enable_pdf) { | 261 | if (enable_pdf) { |
| 262 | --- chrome/common/chrome_content_client.cc.orig | 262 | --- a/chrome/common/chrome_content_client.cc |
| 263 | +++ chrome/common/chrome_content_client.cc | 263 | +++ b/chrome/common/chrome_content_client.cc |
| 264 | @@ -122,7 +122,7 @@ void ComputeBuiltInPlugins(std::vector<c | 264 | @@ -126,7 +126,7 @@ void ComputeBuiltInPlugins(std::vector<c |
| 265 | content::PepperPluginInfo pdf_info; | 265 | content::PepperPluginInfo pdf_info; |
| 266 | pdf_info.is_internal = true; | 266 | pdf_info.is_internal = true; |
| 267 | pdf_info.is_out_of_process = true; | 267 | pdf_info.is_out_of_process = true; |
| @@ -270,9 +270,9 @@ | |||
| 270 | pdf_info.description = kPDFPluginDescription; | 270 | pdf_info.description = kPDFPluginDescription; |
| 271 | pdf_info.path = base::FilePath(ChromeContentClient::kPDFPluginPath); | 271 | pdf_info.path = base::FilePath(ChromeContentClient::kPDFPluginPath); |
| 272 | content::WebPluginMimeType pdf_mime_type( | 272 | content::WebPluginMimeType pdf_mime_type( |
| 273 | --- chrome/common/chrome_content_client.h.orig | 273 | --- a/chrome/common/chrome_content_client.h |
| 274 | +++ chrome/common/chrome_content_client.h | 274 | +++ b/chrome/common/chrome_content_client.h |
| 275 | @@ -42,8 +42,8 @@ class ChromeContentClient : public conte | 275 | @@ -41,8 +41,8 @@ class ChromeContentClient : public conte |
| 276 | static const base::FilePath::CharType kNaClPluginFileName[]; | 276 | static const base::FilePath::CharType kNaClPluginFileName[]; |
| 277 | #endif | 277 | #endif |
| 278 | 278 | ||
| @@ -283,8 +283,8 @@ | |||
| 283 | static const base::FilePath::CharType kPDFPluginPath[]; | 283 | static const base::FilePath::CharType kPDFPluginPath[]; |
| 284 | 284 | ||
| 285 | ChromeContentClient(); | 285 | ChromeContentClient(); |
| 286 | --- chrome/common/chrome_content_client_constants.cc.orig | 286 | --- a/chrome/common/chrome_content_client_constants.cc |
| 287 | +++ chrome/common/chrome_content_client_constants.cc | 287 | +++ b/chrome/common/chrome_content_client_constants.cc |
| 288 | @@ -2,8 +2,12 @@ | 288 | @@ -2,8 +2,12 @@ |
| 289 | // Use of this source code is governed by a BSD-style license that can be | 289 | // Use of this source code is governed by a BSD-style license that can be |
| 290 | // found in the LICENSE file. | 290 | // found in the LICENSE file. |
| @@ -358,9 +358,9 @@ | |||
| 358 | 358 | ||
| 359 | const base::FilePath::CharType ChromeContentClient::kPDFPluginPath[] = | 359 | const base::FilePath::CharType ChromeContentClient::kPDFPluginPath[] = |
| 360 | FILE_PATH_LITERAL("internal-pdf-viewer"); | 360 | FILE_PATH_LITERAL("internal-pdf-viewer"); |
| 361 | --- chrome/renderer/chrome_content_renderer_client.cc.orig | 361 | --- a/chrome/renderer/chrome_content_renderer_client.cc |
| 362 | +++ chrome/renderer/chrome_content_renderer_client.cc | 362 | +++ b/chrome/renderer/chrome_content_renderer_client.cc |
| 363 | @@ -1047,7 +1047,7 @@ WebPlugin* ChromeContentRendererClient:: | 363 | @@ -1027,7 +1027,7 @@ WebPlugin* ChromeContentRendererClient:: |
| 364 | } | 364 | } |
| 365 | } | 365 | } |
| 366 | } else if (info.name == | 366 | } else if (info.name == |
| @@ -369,7 +369,7 @@ | |||
| 369 | // Report PDF load metrics. Since the PDF plugin is comprised of an | 369 | // Report PDF load metrics. Since the PDF plugin is comprised of an |
| 370 | // extension that loads a second plugin, avoid double counting by | 370 | // extension that loads a second plugin, avoid double counting by |
| 371 | // ignoring the creation of the second plugin. | 371 | // ignoring the creation of the second plugin. |
| 372 | @@ -1079,7 +1079,7 @@ WebPlugin* ChromeContentRendererClient:: | 372 | @@ -1059,7 +1059,7 @@ WebPlugin* ChromeContentRendererClient:: |
| 373 | 373 | ||
| 374 | #if BUILDFLAG(ENABLE_PDF) | 374 | #if BUILDFLAG(ENABLE_PDF) |
| 375 | if (info.name == | 375 | if (info.name == |
| @@ -378,7 +378,7 @@ | |||
| 378 | return pdf::CreateInternalPlugin( | 378 | return pdf::CreateInternalPlugin( |
| 379 | info, std::move(params), render_frame, | 379 | info, std::move(params), render_frame, |
| 380 | std::make_unique<ChromePdfInternalPluginDelegate>()); | 380 | std::make_unique<ChromePdfInternalPluginDelegate>()); |
| 381 | @@ -1092,7 +1092,7 @@ WebPlugin* ChromeContentRendererClient:: | 381 | @@ -1072,7 +1072,7 @@ WebPlugin* ChromeContentRendererClient:: |
| 382 | PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type, | 382 | PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type, |
| 383 | url); | 383 | url); |
| 384 | if (info.name == | 384 | if (info.name == |
