chore: bump chromium to 116.0.5845.0 (main) (#38827)

* chore: bump chromium in DEPS to 116.0.5835.0

* chore: update patches

* chore: bump chromium in DEPS to 116.0.5837.0

* chore: bump chromium in DEPS to 116.0.5839.0

* chore: bump chromium in DEPS to 116.0.5841.0

* chore: bump chromium in DEPS to 116.0.5843.0

* Update patches

CLs that affected printing.patch:
- 4616791: Refactor PrintViewManagerBase::PrintNow()
  4616791
- 4602776: Make PrintNodeUnderContextMenu operation go through PrintViewManager
  4602776

* 4506614: geolocation: Add LocationProvider::FillDiagnostics
4506614

* chore: bump chromium in DEPS to 116.0.5845.0

* chore: update patches

* fixup! 4506614: geolocation: Add LocationProvider::FillDiagnostics 4506614

* 4609704: Remove gnome-keyring
4609704

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
This commit is contained in:
electron-roller[bot] 2023-06-22 10:51:15 +02:00 committed by GitHub
parent a00a25376d
commit 1eb19f3078
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 220 additions and 209 deletions

View file

@ -11,7 +11,7 @@ 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 b512618d4ffefa76c50cf5c5cccd5f6516b99c28..c0e30639a7f36b1a7f6dcb040220ac79b64a7293 100644
index 9298bc0945ff258f295bb08849091036d15cadf1..67adb3fe09844e5dcaa8bbd1a9071d13366357ec 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -971,7 +971,6 @@ if (is_win) {
@ -91,7 +91,7 @@ index 3a66a52b8d3c6da9cd8d7e9afdc8d59f528ec3d5..facaa6fbca8ee7c04f83607e62b81b95
: 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 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e33f2e7f6 100644
index c976fb2a814e4ff09650982034371e40d1ab77bc..c9115c7bbead588f3099bb194eb293b0e78ad211 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -23,7 +23,9 @@
@ -187,7 +187,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
}
PrintViewManagerBase::~PrintViewManagerBase() {
@@ -199,7 +222,10 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() {
@@ -199,12 +222,20 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() {
}
#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
@ -196,13 +196,10 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
+ bool silent,
+ base::Value::Dict settings,
+ CompletionCallback callback) {
// Remember the ID for `rfh`, to enable checking that the `RenderFrameHost`
// is still valid after a possible inner message loop runs in
// `DisconnectFromCurrentPrintJob()`.
@@ -227,7 +253,12 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
#endif
if (!StartPrintCommon(rfh)) {
return false;
}
SetPrintingRFH(rfh);
+#if 0
CompletePrintNow(rfh);
+#endif
@ -212,7 +209,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
return true;
}
@@ -323,12 +354,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
@@ -313,12 +344,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
}
PRINTER_LOG(EVENT) << "Paper printable area updated for vendor id "
<< print_settings->requested_media().vendor_id;
@ -227,7 +224,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
base::Value::Dict job_settings,
std::unique_ptr<PrintSettings> print_settings,
UpdatePrintSettingsCallback callback) {
@@ -336,7 +368,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
@@ -326,7 +358,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
settings->pages = GetPageRangesFromJobSettings(job_settings);
settings->params = mojom::PrintParams::New();
RenderParamsFromPrintSettings(*print_settings, settings->params.get());
@ -237,7 +234,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
if (!PrintMsgPrintParamsIsValid(*settings->params)) {
mojom::PrinterType printer_type = static_cast<mojom::PrinterType>(
*job_settings.FindInt(kSettingPrinterType));
@@ -348,6 +381,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
@@ -338,6 +371,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
return;
}
@ -248,7 +245,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
set_cookie(settings->params->document_cookie);
std::move(callback).Run(std::move(settings));
}
@@ -451,7 +488,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
@@ -441,7 +478,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
void PrintViewManagerBase::ScriptedPrintReply(
ScriptedPrintCallback callback,
int process_id,
@ -258,7 +255,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
#if BUILDFLAG(ENABLE_OOP_PRINTING)
@@ -466,12 +504,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
@@ -456,12 +494,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
return;
}
@ -276,7 +273,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
}
}
@@ -608,10 +649,12 @@ void PrintViewManagerBase::DidPrintDocument(
@@ -598,10 +639,12 @@ void PrintViewManagerBase::DidPrintDocument(
void PrintViewManagerBase::GetDefaultPrintSettings(
GetDefaultPrintSettingsCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@ -289,7 +286,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
#if BUILDFLAG(ENABLE_OOP_PRINTING)
if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
#if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
@@ -662,10 +705,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -652,10 +695,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
base::Value::Dict job_settings,
UpdatePrintSettingsCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@ -302,7 +299,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
absl::optional<int> printer_type_value =
job_settings.FindInt(kSettingPrinterType);
@@ -676,6 +721,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -666,6 +711,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
mojom::PrinterType printer_type =
static_cast<mojom::PrinterType>(*printer_type_value);
@ -310,7 +307,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
if (printer_type != mojom::PrinterType::kExtension &&
printer_type != mojom::PrinterType::kPdf &&
printer_type != mojom::PrinterType::kLocal) {
@@ -695,6 +741,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -685,6 +731,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
if (value > 0)
job_settings.Set(kSettingRasterizePdfDpi, value);
}
@ -318,7 +315,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
std::unique_ptr<PrintSettings> print_settings =
PrintSettingsFromJobSettings(job_settings);
@@ -714,6 +761,16 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -704,6 +751,16 @@ void PrintViewManagerBase::UpdatePrintSettings(
}
}
@ -335,7 +332,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
#if BUILDFLAG(IS_WIN)
// TODO(crbug.com/1424368): Remove this if the printable areas can be made
// fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()`
@@ -736,15 +793,13 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -726,15 +783,13 @@ void PrintViewManagerBase::UpdatePrintSettings(
}
#endif
@ -352,7 +349,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
}
void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
@@ -760,14 +815,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
@@ -750,14 +805,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
// didn't happen for some reason.
bad_message::ReceivedBadMessage(
render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME);
@ -369,7 +366,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
return;
}
#endif
@@ -802,6 +857,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
@@ -792,6 +847,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
PrintManager::PrintingFailed(cookie, reason);
@ -377,7 +374,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
// `PrintingFailed()` can occur because asynchronous compositing results
// don't complete until after a print job has already failed and been
// destroyed. In such cases the error notification to the user will
@@ -811,7 +867,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
@@ -801,7 +857,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
print_job_->document()->cookie() == cookie) {
ShowPrintErrorDialogForGenericError();
}
@ -386,7 +383,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
ReleasePrinterQuery();
}
@@ -823,15 +879,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
@@ -813,15 +869,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
test_observers_.RemoveObserver(&observer);
}
@ -411,7 +408,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
}
void PrintViewManagerBase::RenderFrameDeleted(
@@ -883,7 +948,12 @@ void PrintViewManagerBase::OnJobDone() {
@@ -873,7 +938,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.
@ -425,7 +422,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
ReleasePrintJob();
}
@@ -892,9 +962,10 @@ void PrintViewManagerBase::OnCanceling() {
@@ -882,9 +952,10 @@ void PrintViewManagerBase::OnCanceling() {
}
void PrintViewManagerBase::OnFailed() {
@ -437,7 +434,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
TerminatePrintJob(true);
}
@@ -904,7 +975,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
@@ -894,7 +965,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
// Is the document already complete?
if (print_job_->document() && print_job_->document()->IsComplete()) {
@ -446,7 +443,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
return true;
}
@@ -952,7 +1023,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -942,7 +1013,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
// Disconnect the current `print_job_`.
auto weak_this = weak_ptr_factory_.GetWeakPtr();
@ -458,7 +455,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
if (!weak_this)
return false;
@@ -973,7 +1047,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -963,7 +1037,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
#endif
print_job_->AddObserver(*this);
@ -467,7 +464,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
return true;
}
@@ -1041,6 +1115,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -1031,6 +1105,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
}
#endif
@ -479,7 +476,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
if (!print_job_)
return;
@@ -1048,7 +1127,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -1038,7 +1117,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
// printing_rfh_ should only ever point to a RenderFrameHost with a live
// RenderFrame.
DCHECK(rfh->IsRenderFrameLive());
@ -488,7 +485,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
}
print_job_->RemoveObserver(*this);
@@ -1090,7 +1169,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
@@ -1080,7 +1159,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
}
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
@ -497,7 +494,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
return true;
if (!cookie) {
@@ -1199,7 +1278,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
@@ -1224,7 +1303,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
}
void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
@ -506,7 +503,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
for (auto& observer : GetTestObservers()) {
observer.OnPrintNow(rfh);
@@ -1249,7 +1328,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
@@ -1274,7 +1353,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
set_analyzing_content(/*analyzing*/ false);
if (!allowed || !printing_rfh_ || IsCrashed() ||
!printing_rfh_->IsRenderFrameLive()) {
@ -516,7 +513,7 @@ index 2bb42383d753ac39953adf5dccf1cbc02f100b88..2ff3f9391cb60082e2e72af8d9d82c9e
}
CompleteScriptedPrint(printing_rfh_, std::move(params), std::move(callback));
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
index 8af22e511701a595b77bea31da096caedc2e47ce..3136fac6935c998de10e36474b85521dba18012a 100644
index 4ae11ba1c9cabb659910271c1ef20ff08a67df67..bbc77212abe5e73b58605058d7a3c49cfa1c003f 100644
--- a/chrome/browser/printing/print_view_manager_base.h
+++ b/chrome/browser/printing/print_view_manager_base.h
@@ -47,6 +47,8 @@ namespace printing {
@ -538,9 +535,9 @@ index 8af22e511701a595b77bea31da096caedc2e47ce..3136fac6935c998de10e36474b85521d
+ base::Value::Dict settings = {},
+ CompletionCallback callback = {});
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Prints the document in `print_data` with settings specified in
@@ -132,8 +137,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
// Like PrintNow(), but for the node under the context menu, instead of the
// entire frame.
@@ -136,8 +141,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
void IsPrintingEnabled(IsPrintingEnabledCallback callback) override;
void ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
ScriptedPrintCallback callback) override;
@ -551,7 +548,7 @@ index 8af22e511701a595b77bea31da096caedc2e47ce..3136fac6935c998de10e36474b85521d
// Adds and removes observers for `PrintViewManagerBase` events. The order in
// which notifications are sent to observers is undefined. Observers must be
@@ -141,6 +148,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -145,6 +152,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
void AddTestObserver(TestObserver& observer);
void RemoveTestObserver(TestObserver& observer);
@ -566,7 +563,7 @@ index 8af22e511701a595b77bea31da096caedc2e47ce..3136fac6935c998de10e36474b85521d
protected:
explicit PrintViewManagerBase(content::WebContents* web_contents);
@@ -264,6 +279,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -272,6 +287,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
bool success);
#endif
void CompleteUpdatePrintSettings(
@ -574,7 +571,7 @@ index 8af22e511701a595b77bea31da096caedc2e47ce..3136fac6935c998de10e36474b85521d
base::Value::Dict job_settings,
std::unique_ptr<PrintSettings> print_settings,
UpdatePrintSettingsCallback callback);
@@ -293,7 +309,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -301,7 +317,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
// Runs `callback` with `params` to reply to ScriptedPrint().
void ScriptedPrintReply(ScriptedPrintCallback callback,
int process_id,
@ -584,7 +581,7 @@ index 8af22e511701a595b77bea31da096caedc2e47ce..3136fac6935c998de10e36474b85521d
// Requests the RenderView to render all the missing pages for the print job.
// No-op if no print job is pending. Returns true if at least one page has
@@ -363,8 +380,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -371,8 +388,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
// The current RFH that is printing with a system printing dialog.
raw_ptr<content::RenderFrameHost> printing_rfh_ = nullptr;
@ -916,10 +913,10 @@ index d971e446859507456da153a9d59f3ed4857b66cb..9ab75731a941e7065dfaa481508cfa47
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Set options for print preset from source PDF document.
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index cc47fb1a2a3d6a6fe15448ebdba25c29b4b88aa0..e6125b6af20434f3ec3171c044d515b8c120a7b5 100644
index f57b2e228134e72e6b1f1766faf6e119fc15a4aa..7901304acdeb5845f1c1292d6360bda41c0764e0 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -2901,8 +2901,9 @@ source_set("browser") {
@@ -2899,8 +2899,9 @@ source_set("browser") {
"//ppapi/shared_impl",
]