chore: bump chromium to 127.0.6521.0 (main) (#42118)
* chore: bump chromium in DEPS to 126.0.6470.0 * 5492605: Migrate TODOs referencing old crbug IDs to the new issue tracker IDs |5492605
* 5513277: Move subresource-filter-ruleset to GCS |5513277
* 5512656: Remove CustomizeChromeSupportsChromeRefresh2023 |5512656
* 5516009: Accept mouse events in inactive window for Top Chrome WebUIs |5516009
* 5376861: Change references to RWHVB in RWHIER and RenderWidgetTargeter to RWHVI. |5376861
* 5490530: Use partition_alloc PA_BUILDFLAG(...) outside PA. #cleanup |5490530
* 5296870: network: Allow trusted loaders to learn the sent request cookies. |5296870
* 5453438: Delegate delegated ink trails to RWHI from RWHIER. |5453438
* chore: update patches * chore: bump chromium in DEPS to 126.0.6472.0 * chore: bump chromium in DEPS to 126.0.6474.0 * chore: update patches * chore: bump chromium in DEPS to 126.0.6476.0 * chore: bump chromium in DEPS to 126.0.6478.0 * chore: bump chromium in DEPS to 126.0.6478.3 * chore: bump chromium in DEPS to 126.0.6478.8 * update patches * only disable enterprise_cloud_content_analysis * 5403888: [api] support v8::Data in v8::TracedReference and v8::EmbedderGraph5403888
* chore: bump chromium in DEPS to 127.0.6484.0 * chore: bump chromium in DEPS to 127.0.6485.0 * 5539004: Use NOTREACHED_IN_MIGRATION() in remaining chrome/ |5539004
* src: cast to v8::Value before using v8::EmbedderGraph::V8Node | https://github.com/nodejs/node/pull/52638/files * chore: update patches * chore: update v8 patches * chore: bump chromium in DEPS to 127.0.6486.0 * chore: bump chromium in DEPS to 127.0.6488.0 * chore: bump chromium in DEPS to 127.0.6490.0 * chore: bump chromium in DEPS to 127.0.6492.0 * chore: update patches For some reason, `feat_expose_raw_response_headers_from_urlloader.patch` got messed up in an earlier commit. * chore: update patches printing.patch was updated due to5535938
* 5527572: Move Connectors prefs files to components/enterprise/connectors/5527572
* chore: bump chromium in DEPS to 127.0.6494.0 * chore: bump chromium in DEPS to 127.0.6495.0 * chore: bump chromium in DEPS to 127.0.6496.0 * 5465511: [api] Mark v8::ObjectTemplate::SetAccessor(..) for deprecation5465511
* chore: revert v8 deprecation See patch message for more details.5526611
* chore: update patches * 5538771: Remove srcdoc else-if block in CalculateOrigin()5538771
* 5522321: [devtools] Support saving base64 encoded files via host bindings5522321
* 5376861: Change references to RWHVB in RWHIER and RenderWidgetTargeter to RWHVI.5376861
* 5530163: [media] Use VideoFrame::Plane typed enum instead of nameless enum5530163
* 5463431: iwa: Only create IsolatedWebAppURLLoaderFactory for subresources in IWAs5463431
* fixup! 5465511: [api] Mark v8::ObjectTemplate::SetAccessor(..) for deprecation5465511
* 5512176: Remove OnEnvironmentEstimationComplete()5512176
* 5528282: Move Web Speech API .mojom files to //media/mojo/mojom5528282
* 5513740: Reland "[Extensions] Restructure extensions::ProcessMap"5513740
* 5483406: [PEPC] Make PEPC permission subscription take into account device status5483406
* 5526034: [DoH] Remove kDnsOverHttps feature flag5526034
The title is a bit misleading. They removed handling for the feature flag and generally intend to remove it but haven't yet. I only changed our code to address the flag that was removed. A quick search on GitHub for `DnsOverHttpsFallback` yielded a few results, but they were all C++ chromium code or patches, 0 app code or discussion results. Since I couldn't find any evidence of this flag being used in developer applications, I've chosen to exclude this change from the breaking changes docs. * chore: revert v8 removal5497515
See patch message for more details. * chore: cherry-pick Node.js patch for V8 API removal fix Node.js PR: https://github.com/nodejs/node/pull/52996 V8 API Removal CL:5539888
See the patch description for more details. * 5492183: Extensions: CodeHealth: Give enums some class5492183
* fixup! 5528282: Move Web Speech API .mojom files to //media/mojo/mojom5528282
* 5514687: Reland "Add a secret handshake to the base::Feature constructor"5514687
* fixup! 5530163: [media] Use VideoFrame::Plane typed enum instead of nameless enum5530163
* 5466238: PDF Viewer: add metrics to record if PDF is opened with a11y5466238
* 5502081: Migrate OnDisplayRemoved to OnDisplaysRemoved5502081
* 5539888: [api] Remove several APIs deprecated in version 12.65539888
This commit essentially only removes the `only_terminate_in_safe_scope` isolate creation parameter. This undoes some work that was originally done in #35766. * 5498236: Make browser_tests force full async initialization for OSCrypt Async5498236
* fixup! 5528282: Move Web Speech API .mojom files to //media/mojo/mojom5528282
* 5545807: Migrate most remaining NOTREACHED()5545807
I took a systematic approach to modifying all of our uses of `NOTREACHED` that were causing errors: * If there was a `return` or `break` (etc.) immediately after `NOTREACHED`, I removed the control flow instruction and left the `NOTREACHED` unmodified * All other instances were migrated to `NOTREACHED_IN_MIGRATION` We should revisit pretty much all usage of `NOTREACHED` as an upgrade follow-up item. * fixup! 5526034: [DoH] Remove kDnsOverHttps feature flag5526034
Turns out the feature flags were removed in the `.cc` file, but not the `.h` feature list file. This means that the feature flags are pretty much officially gone. (The leftover symbols in the header are likely an oversight from what I can gather.) We may potentially decide to put this in the breaking changes doc if we decide this feature flag is important enough to highlight. * chore: bump chromium in DEPS to 127.0.6498.3 * chore: bump chromium in DEPS to 127.0.6500.0 * chore: bump chromium in DEPS to 127.0.6502.0 * chore: bump chromium in DEPS to 127.0.6504.0 * chore: bump chromium in DEPS to 127.0.6505.0 * chore: bump chromium in DEPS to 127.0.6508.0 * build: use Sha256Sum in script/sysroots.json Xref:5506275
* chore: update chore_add_electron_deps_to_gitignores.patch Xref: no manual changes; patch applied with fuzz 2 * chore: update feat_allow_code_cache_in_custom_schemes.patch Xref: no manual changes; patch applied with fuzz 1 * chore: e patches all * fixup! build: use Sha256Sum in script/sysroots.json `sync` succeeds now * chore: replace absl::optional with std::optional Xref:5253843
* chore: update CalculatePreferredSize() to new upstream semantics Xref:5459174
Xref:5541220
Xref:5514708
Xref:5504212
Xref: https://chromium-review.googlesource.com/516542 * chore: replace absl::optional with std::optional Xref:5296147
* chore: add kPip to enumeration as a no-op5546257
* [Autofill] Remove RenderFrame::ElementBoundsInWindow() Xref:5553982
* chore: fix feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch need new header to pick up definition of BLINK_PLATFORM_EXPORT macro Xref:5463143
* chore: bump chromium in DEPS to 127.0.6510.0 * chore: update patches * chore: fix include path for native_web_keyboard_event.h Xref:5541976
* chore: add currently-unused should_include_device_status arg to GetPermissionStatusForCurrentDocument() Xref:5545382
* chore: bump chromium in DEPS to 127.0.6512.0 * chore: update mas_avoid_private_macos_api_usage.patch.patch No manual changes; patch applied with fuzz 1 * chore: update feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch No manual changes; patch applied with fuzz 1 * chore: update webview_fullscreen.patch No manual changes; patch applied with fuzz 1 * chore=: remove cherry-pick-22db6918bac9.patch already present upstream * chore: remove nonexistent patchfiles from .patches * chore: remove cherry-pick-3e037e195e50.patch no longer needed; merged upstream * Update namespace for files moved to //components/input Xref:5563251
* Require client for InitParams to always specify an ownership mode. Xref:5532482
Xref:5578714
* chore: e patches all * fixup! Update namespace for files moved to //components/input * chore: remove profile_keyed_service_factory, profile_selections from chromium_src already being linked in via chrome browser for printing * chore: bump chromium in DEPS to 127.0.6515.0 * chore: bump chromium in DEPS to 127.0.6516.0 * chore: update render_widget_host_view_base.patch Xref:5547803
patch applied manually due to simple upstream shear * chore: update feat_allow_code_cache_in_custom_schemes.patch No manual changes; patch applied with fuzz 1 * chore: e patches all * Pull RWHIER and RWT to //content/common/input. Xref:5397681
* chore: bump chromium in DEPS to 127.0.6517.0 * chore: update patches * fixup: Update namespace for files moved to //components/input * Remove 0-arg (default) constructor for views::Widget::InitParams.5578714
* fixup: only disable enterprise_cloud_content_analysis The original commita5480accc2
, was due to this CL 5527572: Move Connectors prefs files to components/enterprise/connectors/ |5527572
* chore: bump chromium in DEPS to 127.0.6519.0 * chore: update patches * src: do not use deprecated V8 API https://github.com/nodejs/node/pull/53084 * src: remove dependency on wrapper-descriptor-based cpp heap https://github.com/nodejs/node/pull/53086 * 5344413: [DevTools] Add `getHostConfig` UI binding for sending status of `base::Features` to DevTools5344413
* 5585788: Extensions: ManifestHandler: Separate Registry like ExtensionRegistry5585788
* chore: update filenames.libcxx.gni * 5506857: Reland "Migrate clang-format to gcs first class deps"5506857
* fixup: 5539888: [api] Remove several APIs deprecated in version 12.6 * fixup: 5506857: Reland Migrate clang-format to gcs first class deps * chore: bump chromium in DEPS to 127.0.6521.0 * chore: update patches * spec: update navigator.keyboard should lock the keyboard * Block or allow all MIDI using the existing SysEx permission Refs5154368
Refs5499157
* spec: update test/parallel/test-v8-stats * views: remove CalculatePreferredSize() Refs5504212
* chore: update patches after rebase * 5560288: Re-enable ChromeOS XNNPack on Intel only5560288
* chore: add nan patches for v8 changes Refs 5539888: [api] Remove several APIs deprecated in version 12.6 |5539888
and 5539852: [heap][api] Remove deprecated v8::Isolate::IdleNotificationDeadline |5539852
* 5573603: Modularize //chrome/browser/themes5573603
* 5539888: [api] Remove several APIs deprecated in version 12.65539888
* chore: update patches * test: fixup navigator.keyboard.lock on Windows * chore: remove unneeded profile target --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <khammond@slack-corp.com> Co-authored-by: VerteDinde <vertedinde@electronjs.org> Co-authored-by: Jeremy Rose <nornagon@nornagon.net> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
parent
84e15e2d04
commit
c3b4cd987c
202 changed files with 1843 additions and 1127 deletions
|
@ -11,10 +11,10 @@ majority of changes originally come from these PRs:
|
|||
This patch also fixes callback for manual user cancellation and success.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 8f91d4fe0053d6013be38eff24a7c7df1653dd8a..ddae4d8c3fc9dd3d40cde80d810ebc5418d6e3f7 100644
|
||||
index a958dad6344b8660b38c3143f1dcf792a3bab43b..df6fd814d703bed76a7eba2ab54cacc3a79a63d0 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -969,7 +969,6 @@ if (is_win) {
|
||||
@@ -978,7 +978,6 @@ if (is_win) {
|
||||
"//media:media_unittests",
|
||||
"//media/midi:midi_unittests",
|
||||
"//net:net_unittests",
|
||||
|
@ -22,7 +22,7 @@ index 8f91d4fe0053d6013be38eff24a7c7df1653dd8a..ddae4d8c3fc9dd3d40cde80d810ebc54
|
|||
"//sql:sql_unittests",
|
||||
"//third_party/breakpad:symupload($host_toolchain)",
|
||||
"//ui/base:ui_base_unittests",
|
||||
@@ -978,6 +977,10 @@ if (is_win) {
|
||||
@@ -987,6 +986,10 @@ if (is_win) {
|
||||
"//ui/views:views_unittests",
|
||||
"//url:url_unittests",
|
||||
]
|
||||
|
@ -34,7 +34,7 @@ index 8f91d4fe0053d6013be38eff24a7c7df1653dd8a..ddae4d8c3fc9dd3d40cde80d810ebc54
|
|||
}
|
||||
|
||||
diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
|
||||
index 3197e16ac26f17258bf3ef988df0f0e39c0df8ac..89d618a39c89ad3eb0069f2b5bd67f6024c3260e 100644
|
||||
index 163eacc8bb6654880d37111923a87ea5a6134485..565258e9bd4cc52e347e1f4a72ee29ec4a847690 100644
|
||||
--- a/chrome/browser/printing/print_job.cc
|
||||
+++ b/chrome/browser/printing/print_job.cc
|
||||
@@ -97,6 +97,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) {
|
||||
|
@ -91,7 +91,7 @@ index 3197e16ac26f17258bf3ef988df0f0e39c0df8ac..89d618a39c89ad3eb0069f2b5bd67f60
|
|||
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
|
||||
}
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2835ec453 100644
|
||||
index c68d3d2f7fdaab62aac24b79e0cf71e0eb84cf72..3084546bee021eb2752335b8d31d48d28a6e5af1 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -87,6 +87,20 @@ namespace printing {
|
||||
|
@ -187,6 +187,15 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
|
||||
for (auto& observer : GetTestObservers()) {
|
||||
observer.OnPrintNow(rfh);
|
||||
@@ -295,7 +319,7 @@ void PrintViewManagerBase::PrintDocument(
|
||||
const gfx::Size& page_size,
|
||||
const gfx::Rect& content_area,
|
||||
const gfx::Point& offsets) {
|
||||
-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS)
|
||||
+#if 0
|
||||
if (content_analysis_before_printing_document_) {
|
||||
std::move(content_analysis_before_printing_document_)
|
||||
.Run(print_data, page_size, content_area, offsets);
|
||||
@@ -342,12 +366,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
|
||||
}
|
||||
PRINTER_LOG(EVENT) << "Paper printable area updated for vendor id "
|
||||
|
@ -223,7 +232,34 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
set_cookie(settings->params->document_cookie);
|
||||
std::move(callback).Run(std::move(settings));
|
||||
}
|
||||
@@ -740,10 +770,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -436,7 +466,7 @@ void PrintViewManagerBase::StartLocalPrintJob(
|
||||
PrinterHandler::PrintCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
||||
-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS)
|
||||
+#if 0
|
||||
// Populating `content_analysis_before_printing_document_` if needed should be
|
||||
// done first in this function's workflow, this way other code can check if
|
||||
// content analysis is going to happen and delay starting `print_job_` to
|
||||
@@ -669,7 +699,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings(
|
||||
|
||||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
if (ShouldPrintJobOop() &&
|
||||
-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS)
|
||||
+#if 0
|
||||
!analyzing_content_ &&
|
||||
#endif
|
||||
!query_with_ui_client_id().has_value()) {
|
||||
@@ -697,7 +727,7 @@ void PrintViewManagerBase::GetDefaultPrintSettings(
|
||||
|
||||
// Sometimes it is desired to get the PDF settings as opposed to the settings
|
||||
// of the default system print driver.
|
||||
-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS)
|
||||
+#if 0
|
||||
bool want_pdf_settings = analyzing_content_;
|
||||
#else
|
||||
bool want_pdf_settings = false;
|
||||
@@ -741,10 +771,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
// `job_settings` does not yet contain the rasterized PDF dpi, so if the user
|
||||
// has the print preference set, fetch it for use in
|
||||
// `PrintSettingsFromJobSettings()`.
|
||||
|
@ -235,7 +271,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
if (prefs && prefs->HasPrefPath(prefs::kPrintRasterizePdfDpi)) {
|
||||
int value = prefs->GetInteger(prefs::kPrintRasterizePdfDpi);
|
||||
if (value > 0)
|
||||
@@ -768,8 +795,22 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -769,8 +796,22 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -260,7 +296,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
// fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()`
|
||||
// for in-browser queries.
|
||||
if (printer_type == mojom::PrinterType::kLocal) {
|
||||
@@ -790,8 +831,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -791,8 +832,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -269,7 +305,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::SetAccessibilityTree(
|
||||
@@ -807,7 +846,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
|
||||
@@ -808,7 +847,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
|
||||
void PrintViewManagerBase::IsPrintingEnabled(
|
||||
IsPrintingEnabledCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
@ -278,7 +314,16 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -863,11 +902,9 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -834,7 +873,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS)
|
||||
+#if 0
|
||||
std::optional<enterprise_connectors::ContentAnalysisDelegate::Data>
|
||||
scanning_data = enterprise_data_protection::GetPrintAnalysisData(
|
||||
web_contents(), enterprise_data_protection::PrintScanningContext::
|
||||
@@ -864,11 +903,9 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
// destroyed. In such cases the error notification to the user will
|
||||
// have already been displayed, and a second message should not be
|
||||
// shown.
|
||||
|
@ -292,7 +337,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
ReleasePrinterQuery();
|
||||
}
|
||||
|
||||
@@ -879,15 +916,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
|
||||
@@ -880,15 +917,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
|
||||
test_observers_.RemoveObserver(&observer);
|
||||
}
|
||||
|
||||
|
@ -317,7 +362,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::RenderFrameDeleted(
|
||||
@@ -935,7 +981,7 @@ void PrintViewManagerBase::SystemDialogCancelled() {
|
||||
@@ -936,7 +982,7 @@ void PrintViewManagerBase::SystemDialogCancelled() {
|
||||
#endif
|
||||
|
||||
bool PrintViewManagerBase::GetPrintingEnabledBooleanPref() const {
|
||||
|
@ -326,7 +371,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::OnDocDone(int job_id, PrintedDocument* document) {
|
||||
@@ -952,7 +998,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
@@ -953,7 +999,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
// Printing is done, we don't need it anymore.
|
||||
// print_job_->is_job_pending() may still be true, depending on the order
|
||||
// of object registration.
|
||||
|
@ -340,7 +385,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
ReleasePrintJob();
|
||||
}
|
||||
|
||||
@@ -961,9 +1012,9 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
@@ -962,9 +1013,9 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::OnFailed() {
|
||||
|
@ -352,7 +397,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
TerminatePrintJob(true);
|
||||
}
|
||||
|
||||
@@ -973,7 +1024,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
@@ -974,7 +1025,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
|
||||
// Is the document already complete?
|
||||
if (print_job_->document() && print_job_->document()->IsComplete()) {
|
||||
|
@ -361,7 +406,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -1026,7 +1077,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
|
||||
@@ -1027,7 +1078,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
|
||||
|
||||
// Disconnect the current `print_job_`.
|
||||
auto weak_this = weak_ptr_factory_.GetWeakPtr();
|
||||
|
@ -373,7 +418,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
if (!weak_this)
|
||||
return false;
|
||||
|
||||
@@ -1046,7 +1100,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
|
||||
@@ -1047,7 +1101,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
|
||||
#endif
|
||||
print_job_->AddObserver(*this);
|
||||
|
||||
|
@ -382,7 +427,16 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -1114,6 +1168,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -1105,7 +1159,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
// Ensure that any residual registration of printing client is released.
|
||||
// This might be necessary in some abnormal cases, such as the associated
|
||||
// render process having terminated.
|
||||
-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS)
|
||||
+#if 0
|
||||
if (!analyzing_content_) {
|
||||
UnregisterSystemPrintClient();
|
||||
}
|
||||
@@ -1115,6 +1169,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -394,7 +448,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
if (!print_job_)
|
||||
return;
|
||||
|
||||
@@ -1121,7 +1180,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -1122,7 +1181,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
// printing_rfh_ should only ever point to a RenderFrameHost with a live
|
||||
// RenderFrame.
|
||||
DCHECK(rfh->IsRenderFrameLive());
|
||||
|
@ -403,7 +457,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
}
|
||||
|
||||
print_job_->RemoveObserver(*this);
|
||||
@@ -1163,7 +1222,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -1164,7 +1223,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
|
@ -412,7 +466,16 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
return true;
|
||||
|
||||
if (!cookie) {
|
||||
@@ -1317,6 +1376,8 @@ void PrintViewManagerBase::CompleteScriptedPrint(
|
||||
@@ -1187,7 +1246,7 @@ bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
return false;
|
||||
}
|
||||
|
||||
-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS)
|
||||
+#if 0
|
||||
// Don't start printing if enterprise checks are being performed to check if
|
||||
// printing is allowed, or if content analysis is going to take place right
|
||||
// before starting `print_job_`.
|
||||
@@ -1318,6 +1377,8 @@ void PrintViewManagerBase::CompleteScriptedPrint(
|
||||
auto callback_wrapper = base::BindOnce(
|
||||
&PrintViewManagerBase::ScriptedPrintReply, weak_ptr_factory_.GetWeakPtr(),
|
||||
std::move(callback), render_process_host->GetID());
|
||||
|
@ -421,7 +484,7 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
#if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
DisableThirdPartyBlocking();
|
||||
#endif
|
||||
@@ -1331,7 +1392,7 @@ void PrintViewManagerBase::CompleteScriptedPrint(
|
||||
@@ -1332,10 +1393,10 @@ void PrintViewManagerBase::CompleteScriptedPrint(
|
||||
params->expected_pages_count, params->has_selection, params->margin_type,
|
||||
params->is_scripted, !render_process_host->IsPdf(),
|
||||
base::BindOnce(&OnDidScriptedPrint, queue_, std::move(printer_query),
|
||||
|
@ -429,9 +492,13 @@ index c0d1a3631a2367bb7cef2a62e5ad78619ca9f699..668a9c2f1ea861c9136d8c076afd20b2
|
|||
+ std::move(callback_wrapper), std::move(cancel_job_wrapper)));
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS)
|
||||
-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS)
|
||||
+#if 0
|
||||
void PrintViewManagerBase::CompletePrintDocumentAfterContentAnalysis(
|
||||
scoped_refptr<base::RefCountedMemory> print_data,
|
||||
const gfx::Size& page_size,
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
|
||||
index 1917f8b94962d7a4c83f139623a5f5d352011627..1fcc90cf6f9c143b956d9d9422098e85bbf54b21 100644
|
||||
index 1917f8b94962d7a4c83f139623a5f5d352011627..47ef610c43c4dcfee0cf528eb2e6075b579117ee 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.h
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.h
|
||||
@@ -52,6 +52,8 @@ class PrinterQuery;
|
||||
|
@ -480,6 +547,15 @@ index 1917f8b94962d7a4c83f139623a5f5d352011627..1fcc90cf6f9c143b956d9d9422098e85
|
|||
protected:
|
||||
#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS)
|
||||
using PrintDocumentCallback =
|
||||
@@ -229,7 +243,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
mojom::ScriptedPrintParamsPtr params,
|
||||
ScriptedPrintCallback callback);
|
||||
|
||||
-#if BUILDFLAG(ENTERPRISE_CONTENT_ANALYSIS)
|
||||
+#if 0
|
||||
// Helper method bound to `content_analysis_before_printing_document_` when
|
||||
// content analysis should happen right before the document is to be printed.
|
||||
// This method is virtual for testing purposes.
|
||||
@@ -293,6 +307,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
bool success);
|
||||
#endif
|
||||
|
@ -555,10 +631,10 @@ index ca71560874a0189068dd11fbc039f5673bf6bd96..a8551d95e64da2afbc1685b2df8f1fc3
|
|||
mojom::PrintFailureReason reason) override;
|
||||
|
||||
diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom
|
||||
index 4ecdb28904fac480cf102fffdff24ae008ac88cf..0d7d20c1a7920b1961585b345d30d9969411ca9e 100644
|
||||
index 3c2fdc9f9a6c60efc4b0afacbfb83eef55917791..8fd9aff538fa03da6c171927c316d4f611c46da1 100644
|
||||
--- a/components/printing/common/print.mojom
|
||||
+++ b/components/printing/common/print.mojom
|
||||
@@ -302,7 +302,7 @@ union PrintWithParamsResult {
|
||||
@@ -303,7 +303,7 @@ union PrintWithParamsResult {
|
||||
interface PrintRenderFrame {
|
||||
// Tells the RenderFrame to switch the CSS to print media type, render every
|
||||
// requested page, and then switch back the CSS to display media type.
|
||||
|
@ -567,7 +643,7 @@ index 4ecdb28904fac480cf102fffdff24ae008ac88cf..0d7d20c1a7920b1961585b345d30d996
|
|||
|
||||
// Requests the frame to be printed with specified parameters. This is used
|
||||
// to programmatically produce PDF by request from the browser (e.g. over
|
||||
@@ -391,6 +391,9 @@ interface PrintManagerHost {
|
||||
@@ -392,6 +392,9 @@ interface PrintManagerHost {
|
||||
[Sync]
|
||||
ScriptedPrint(ScriptedPrintParams params) => (PrintPagesParams? settings);
|
||||
|
||||
|
@ -578,10 +654,10 @@ index 4ecdb28904fac480cf102fffdff24ae008ac88cf..0d7d20c1a7920b1961585b345d30d996
|
|||
PrintingFailed(int32 cookie, PrintFailureReason reason);
|
||||
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
|
||||
index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd7e2798cc 100644
|
||||
index 1c12ab70d993b742ee73b1235ecfdd3239125e97..b24751087f4015fc6b93518af95b0911529d3c6e 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -50,6 +50,7 @@
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
#include "printing/page_number.h"
|
||||
#include "printing/print_job_constants.h"
|
||||
|
@ -589,7 +665,7 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd
|
|||
#include "printing/units.h"
|
||||
#include "services/metrics/public/cpp/ukm_source_id.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
@@ -1313,14 +1314,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
@@ -1224,14 +1225,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
}
|
||||
|
||||
print_in_progress_ = true;
|
||||
|
@ -606,16 +682,39 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd
|
|||
if (!weak_this) {
|
||||
return;
|
||||
}
|
||||
@@ -1351,7 +1352,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
@@ -1262,12 +1263,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
receivers_.Add(this, std::move(receiver));
|
||||
}
|
||||
|
||||
-void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
- PrintRequestedPagesInternal(/*already_notified_frame=*/false);
|
||||
+void PrintRenderFrameHelper::PrintRequestedPages(base::Value::Dict settings) {
|
||||
+ PrintRequestedPagesInternal(/*already_notified_frame=*/false,
|
||||
+ std::move(settings));
|
||||
}
|
||||
|
||||
void PrintRenderFrameHelper::PrintRequestedPagesInternal(
|
||||
- bool already_notified_frame) {
|
||||
+ bool already_notified_frame,
|
||||
+ base::Value::Dict settings) {
|
||||
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) {
|
||||
return;
|
||||
@@ -1366,7 +1367,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
@@ -1284,9 +1287,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
|
||||
|
||||
is_loading_ = frame->WillPrintSoon();
|
||||
if (is_loading_) {
|
||||
- on_stop_loading_closure_ = base::BindOnce(
|
||||
- &PrintRenderFrameHelper::PrintRequestedPagesInternal,
|
||||
- weak_ptr_factory_.GetWeakPtr(), /*already_notified_frame=*/true);
|
||||
+ on_stop_loading_closure_ =
|
||||
+ base::BindOnce(&PrintRenderFrameHelper::PrintRequestedPagesInternal,
|
||||
+ weak_ptr_factory_.GetWeakPtr(),
|
||||
+ /*already_notified_frame=*/true, std::move(settings));
|
||||
SetupOnStopLoadingTimeout();
|
||||
return;
|
||||
}
|
||||
@@ -1296,7 +1300,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
|
||||
// plugin node and print that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
|
||||
|
@ -624,7 +723,7 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd
|
|||
|
||||
if (render_frame_gone_) {
|
||||
return;
|
||||
@@ -1523,6 +1524,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
|
||||
@@ -1453,6 +1457,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
return;
|
||||
|
||||
|
@ -633,7 +732,7 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd
|
|||
print_preview_context_.OnPrintPreview();
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -2110,17 +2113,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -2045,17 +2051,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
|
@ -656,7 +755,7 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd
|
|||
DidFinishPrinting(PrintingResult::kFailPrintInit);
|
||||
return;
|
||||
}
|
||||
@@ -2141,8 +2146,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -2076,8 +2084,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
print_pages_params_->params->print_scaling_option;
|
||||
|
||||
auto self = weak_ptr_factory_.GetWeakPtr();
|
||||
|
@ -673,7 +772,7 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd
|
|||
// Check if `this` is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -2404,29 +2416,37 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
@@ -2338,29 +2353,37 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
}
|
||||
|
||||
bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame,
|
||||
|
@ -719,10 +818,10 @@ index 0f137884ad0eb188f1f3a4eb1e02f8aab56351be..fb0a3dfd4fcf6c7e017bea2e7e56a5cd
|
|||
}
|
||||
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
|
||||
index b0ac94751454bd16b4e9bfdc071e2623813133ec..2631e9019e4c6617e2a8a90d30a21ca5552f1d67 100644
|
||||
index 14de029740ffbebe06d309651c1a2c007d9fb96b..e9bf9c5bef2a9235260e7d6c8d26d41528e38661 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.h
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.h
|
||||
@@ -245,7 +245,7 @@ class PrintRenderFrameHelper
|
||||
@@ -251,7 +251,7 @@ class PrintRenderFrameHelper
|
||||
mojo::PendingAssociatedReceiver<mojom::PrintRenderFrame> receiver);
|
||||
|
||||
// printing::mojom::PrintRenderFrame:
|
||||
|
@ -731,7 +830,7 @@ index b0ac94751454bd16b4e9bfdc071e2623813133ec..2631e9019e4c6617e2a8a90d30a21ca5
|
|||
void PrintWithParams(mojom::PrintPagesParamsPtr params,
|
||||
PrintWithParamsCallback callback) override;
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
@@ -312,7 +312,8 @@ class PrintRenderFrameHelper
|
||||
@@ -318,7 +318,8 @@ class PrintRenderFrameHelper
|
||||
// WARNING: |this| may be gone after this method returns.
|
||||
void Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
|
@ -741,7 +840,7 @@ index b0ac94751454bd16b4e9bfdc071e2623813133ec..2631e9019e4c6617e2a8a90d30a21ca5
|
|||
|
||||
// Notification when printing is done - signal tear-down/free resources.
|
||||
void DidFinishPrinting(PrintingResult result);
|
||||
@@ -322,7 +323,8 @@ class PrintRenderFrameHelper
|
||||
@@ -328,7 +329,8 @@ class PrintRenderFrameHelper
|
||||
// Initialize print page settings with default settings.
|
||||
// Used only for native printing workflow.
|
||||
bool InitPrintSettings(blink::WebLocalFrame* frame,
|
||||
|
@ -751,11 +850,21 @@ index b0ac94751454bd16b4e9bfdc071e2623813133ec..2631e9019e4c6617e2a8a90d30a21ca5
|
|||
|
||||
// Calculate number of pages in source document.
|
||||
uint32_t CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||
@@ -625,7 +627,8 @@ class PrintRenderFrameHelper
|
||||
};
|
||||
|
||||
void SetupOnStopLoadingTimeout();
|
||||
- void PrintRequestedPagesInternal(bool already_notified_frame);
|
||||
+ void PrintRequestedPagesInternal(bool already_notified_frame,
|
||||
+ base::Value::Dict settings);
|
||||
|
||||
ScriptingThrottler scripting_throttler_;
|
||||
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index 3b33b098d4617eef7dd0a8084e27a00c0d02449c..0de190f5d57634a0b5bc229f78dd820a50a8fb95 100644
|
||||
index 24b1ea6fc5fef18b199518ae730713baaa8c0530..663bce7e031c11417d9e54c78a99fdf17bb7bd13 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -2935,8 +2935,9 @@ source_set("browser") {
|
||||
@@ -2963,8 +2963,9 @@ source_set("browser") {
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
|
||||
|
@ -768,7 +877,7 @@ index 3b33b098d4617eef7dd0a8084e27a00c0d02449c..0de190f5d57634a0b5bc229f78dd820a
|
|||
if (is_chromeos) {
|
||||
sources += [
|
||||
diff --git a/printing/printing_context.cc b/printing/printing_context.cc
|
||||
index 87ffdf6f44029700ef615b16366e3a9805e7d3ff..ea407211ca4e33b87de5ed6002ebe1a2ef76372f 100644
|
||||
index e9d9b148387313d8f6dd399d69a69272a511e6b4..a97983e9736daffdfeb713ae7b263f146f79ad0b 100644
|
||||
--- a/printing/printing_context.cc
|
||||
+++ b/printing/printing_context.cc
|
||||
@@ -154,7 +154,6 @@ void PrintingContext::UsePdfSettings() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue