chore: bump chromium to 107.0.5274.0 (main) (#35375)
* chore: bump chromium in DEPS to 106.0.5247.1 * chore: update can_create_window.patch Xref:3805043
content/renderer/render_view_impl.cc was removed * chore: update patches/chromium/printing.patch Normal code shear. * chore: update patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch Xref:3764862
fix minor code shear that caused the patch to not apply * chore: update patches/chromium/picture-in-picture.patch Xref:3781646
Normal code shear. * chore: update patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch Xref:3805043
content/renderer/render_view_impl.cc was removed Xref:3792324
Normal code shear. * chore: update patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch Normal code shear. * chore: update patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch Xref:3798548
Normal code shear. * chore: update patches/chromium/build_disable_print_content_analysis.patch Xref:3810473
Normal code shear. * chore: short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch Xref:3807504
Normal code shear. * chore: update patches * chore: bump chromium in DEPS to 106.0.5249.0 * chore: bump chromium in DEPS to 107.0.5250.0 * chore: bump chromium in DEPS to 107.0.5252.0 * chore: bump chromium in DEPS to 107.0.5254.0 * chore: bump chromium in DEPS to 107.0.5256.1 * chore: update v8 patches * chore: update chromium patches * [CodeHealthRotation] base::Value::Dict (v2) migration for //c/b/ui/zoom Refs3778239
* Add support for snapped window states for lacros3810538
* webui: Migrate /chrome/browser/ui/webui URLDataSources to GetMimeType(GURL) Refs3774560
* Provide explicit template arguments to blink::AssociatedInterfaceRegistry::AddInterface Refs3773459
* Make WebScriptExecutionCallback base::OnceCallback Refs3676532
3724623
3675752
* Add implementation of reduce accept language service Refs3687391
* Add PermissionResult in //content/public. Refs3807504
* [Extensions] Add new Webstore domain to extension URLs and clients Refs3793043
* chore: update node patches * chore: fix lint * chore: update filenames.libcxx.gni * fixup! Make WebScriptExecutionCallback base::OnceCallback * chore: bump chromium in DEPS to 107.0.5266.1 * chore: bump chromium in DEPS to 107.0.5268.0 * chore: bump chromium in DEPS to 107.0.5270.1 * chore: update patches * 3848842: [DevTools] Added 'printing-in-progress' error code. https://chromium-review.googlesource.com/c/chromium/src/+/38488 * 3855766: PA: Move the allocator shim files into partition_allocator/shim/ |3855766
* Change gfx::Rect to blink::mojom::WindowFeatures in AddNewContents and some related functions.3835666
* Use base::FunctionRef for the various ForEachRenderFrameHost helpers.3767487
* [loader] Send cached metadata as part of OnReceiveResponse3811219
* 3832927: [json-schema-compiler] Support abs::optional<int>3832927
* Use unique_ptr for BrowserPluginGuestDelegate::CreateNewGuestWindow3847070
* 3847044: [Android] Dismiss select popup upon entering fullscreen3847044
* chore: update patches * chore: add missing header * Migration of chrome/ BrowserContextKeyedServiceFactory to ProfileKeyedServiceFactory Part 123804581
* 3786946: cast pwrite64 arg to long to avoid compilation error on arm3786946
* chore: update patches after rebase * 3846114: float: Implement for lacros p2.3846114
* 3825237: Enable -Wunqualified-std-cast-call3825237
* chore: bump chromium in DEPS to 107.0.5272.0 * chore: update patches * 3835746: Rename PepperPluginInfo to ContentPluginInfo3835746
* 3852542: Plumb drag-image rect from blink to browser to RenderWidgetHostImpl3852542
* 3826169: [json-schema-compiler] Support abs::optional<bool>3826169
Also 3840687: [json-schema-compiler] Support abs::optional<double>3840687
* 3857319: Reland "Remove PrefService::Get"3857319
* 3854614: Rework LinuxUi ownership and creation3854614
* chore: bump chromium in DEPS to 107.0.5274.0 * 3866104: [DownloadBubble] Change download notifications in exclusive_access3866104
* chore: update patches * chore: disable optimization guide for preconnect feature * 3860569: Enable -Wshadow on Linux.3860569
* chore: update patches after rebase * fixup: update to accomodate Wc++98-compat-extra-semi flag * Revert "fixup! Make WebScriptExecutionCallback base::OnceCallback" This reverts commit 0866fe8648671f04e4ea45ceed85db6e4a3b260b. * fixup! Make WebScriptExecutionCallback base::OnceCallback * fixup! Make WebScriptExecutionCallback base::OnceCallback * 3840937: [sandbox] Merge V8_SANDBOXED_POINTERS into V8_ENABLE_SANDBOX3840937
* fixup! chore: update can_create_window.patch * chore: update patches * 53946: Track SSL_ERROR_ZERO_RETURN explicitly. https://boringssl-review.googlesource.com/c/boringssl/+/53946 * fixup: Migration of chrome/ BrowserContextKeyedServiceFactory to ProfileKeyedServiceFactory Part 123804581
* 3805932: [headless] Added print compositor support for OOPIF printing.3805932
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
f53ca20d41
commit
08ccc81574
154 changed files with 1403 additions and 907 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 32902c0b0c7fa1f1b4371f1bee24c364a4ff89e2..0c9b25af67c7b44b8e839e8839a3ea0ca8b03202 100644
|
||||
index 90f92c53aea415aec1fd997d99d17ffc911811e4..c299bc4a8b2f483ff8607e5e89895158aef120dd 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -973,7 +973,6 @@ if (is_win) {
|
||||
@@ -984,7 +984,6 @@ if (is_win) {
|
||||
"//media:media_unittests",
|
||||
"//media/midi:midi_unittests",
|
||||
"//net:net_unittests",
|
||||
|
@ -22,7 +22,7 @@ index 32902c0b0c7fa1f1b4371f1bee24c364a4ff89e2..0c9b25af67c7b44b8e839e8839a3ea0c
|
|||
"//sql:sql_unittests",
|
||||
"//third_party/breakpad:symupload($host_toolchain)",
|
||||
"//ui/base:ui_base_unittests",
|
||||
@@ -982,6 +981,10 @@ if (is_win) {
|
||||
@@ -993,6 +992,10 @@ if (is_win) {
|
||||
"//ui/views:views_unittests",
|
||||
"//url:url_unittests",
|
||||
]
|
||||
|
@ -78,7 +78,7 @@ index 331a084371402b5a2440b5d60feac8f0189e84b9..6755d1f497cef4deea6b83df1d8720dc
|
|||
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
|
||||
}
|
||||
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
|
||||
index ab2f824eb77ae4c8a916d57914120544bec70ec5..8eef429cf3ea613e83dc408d93faa8d2661cf5db 100644
|
||||
index f0d4596f0e95391e752c48dc6ac12f76397c27f1..b7313ce8037c88aa5b8826dc2edcb0dfa4ebee46 100644
|
||||
--- a/chrome/browser/printing/print_job_worker.cc
|
||||
+++ b/chrome/browser/printing/print_job_worker.cc
|
||||
@@ -20,7 +20,6 @@
|
||||
|
@ -97,7 +97,7 @@ index ab2f824eb77ae4c8a916d57914120544bec70ec5..8eef429cf3ea613e83dc408d93faa8d2
|
|||
#include "printing/backend/print_backend.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
@@ -209,16 +209,19 @@ void PrintJobWorker::SetSettings(base::Value::Dict new_settings,
|
||||
@@ -208,16 +208,19 @@ void PrintJobWorker::SetSettings(base::Value::Dict new_settings,
|
||||
#endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS)
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ index 398d59a0ebad165981e9e96b29ffc672e4b841eb..e420d87ef0e90cddb740ac4b24f92519
|
|||
|
||||
void PrintJobWorkerOop::UnregisterServiceManagerClient() {
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212b98a2b15 100644
|
||||
index b73982f234aaca5492fdf06a46e0231e66e3504f..ad4631f6ae9211fe6e5d09c46a8b26538b90c1b2 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -30,8 +30,6 @@
|
||||
|
@ -146,7 +146,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
@@ -86,10 +84,23 @@ namespace printing {
|
||||
@@ -82,10 +80,23 @@ namespace printing {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -170,7 +170,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
// Runs always on the UI thread.
|
||||
static bool is_dialog_shown = false;
|
||||
if (is_dialog_shown)
|
||||
@@ -98,6 +109,7 @@ void ShowWarningMessageBox(const std::u16string& message) {
|
||||
@@ -94,6 +105,7 @@ void ShowWarningMessageBox(const std::u16string& message) {
|
||||
base::AutoReset<bool> auto_reset(&is_dialog_shown, true);
|
||||
|
||||
chrome::ShowWarningMessageBox(nullptr, std::u16string(), message);
|
||||
|
@ -178,7 +178,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
}
|
||||
|
||||
void OnDidGetDefaultPrintSettings(
|
||||
@@ -147,7 +159,9 @@ void OnDidUpdatePrintSettings(
|
||||
@@ -143,7 +155,9 @@ void OnDidUpdatePrintSettings(
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
DCHECK(printer_query);
|
||||
mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr();
|
||||
|
@ -189,7 +189,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
RenderParamsFromPrintSettings(printer_query->settings(),
|
||||
params->params.get());
|
||||
params->params->document_cookie = printer_query->cookie();
|
||||
@@ -175,6 +189,7 @@ void OnDidScriptedPrint(
|
||||
@@ -171,6 +185,7 @@ void OnDidScriptedPrint(
|
||||
mojom::PrintManagerHost::ScriptedPrintCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr();
|
||||
|
@ -197,7 +197,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
if (printer_query->last_status() == mojom::ResultCode::kSuccess &&
|
||||
printer_query->settings().dpi()) {
|
||||
RenderParamsFromPrintSettings(printer_query->settings(),
|
||||
@@ -184,7 +199,8 @@ void OnDidScriptedPrint(
|
||||
@@ -180,7 +195,8 @@ void OnDidScriptedPrint(
|
||||
}
|
||||
bool has_valid_cookie = params->params->document_cookie;
|
||||
bool has_dpi = !params->params->dpi.IsEmpty();
|
||||
|
@ -207,7 +207,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
|
||||
if (has_dpi && has_valid_cookie) {
|
||||
queue->QueuePrinterQuery(std::move(printer_query));
|
||||
@@ -199,12 +215,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
@@ -195,12 +211,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
: PrintManager(web_contents),
|
||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||
DCHECK(queue_);
|
||||
|
@ -222,7 +222,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
}
|
||||
|
||||
PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -212,7 +230,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -208,7 +226,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
DisconnectFromCurrentPrintJob();
|
||||
}
|
||||
|
||||
|
@ -234,17 +234,19 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
// Remember the ID for `rfh`, to enable checking that the `RenderFrameHost`
|
||||
// is still valid after a possible inner message loop runs in
|
||||
// `DisconnectFromCurrentPrintJob()`.
|
||||
@@ -240,6 +261,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
@@ -236,7 +257,10 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
#endif
|
||||
|
||||
SetPrintingRFH(rfh);
|
||||
- CompletePrintNow(rfh);
|
||||
+ //CompletePrintNow(rfh);
|
||||
+ callback_ = std::move(callback);
|
||||
+
|
||||
+ GetPrintRenderFrame(rfh)->PrintRequestedPages(silent, std::move(settings));
|
||||
return true;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
|
||||
enterprise_connectors::ContentAnalysisDelegate::Data scanning_data;
|
||||
@@ -452,7 +476,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
|
||||
@@ -395,7 +419,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
|
||||
void PrintViewManagerBase::ScriptedPrintReply(
|
||||
ScriptedPrintCallback callback,
|
||||
int process_id,
|
||||
|
@ -254,7 +256,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
||||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
@@ -467,8 +492,11 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
@@ -410,15 +435,18 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -267,17 +269,15 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::UpdatePrintingEnabled() {
|
||||
@@ -476,8 +504,7 @@ void PrintViewManagerBase::UpdatePrintingEnabled() {
|
||||
// The Unretained() is safe because ForEachRenderFrameHost() is synchronous.
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
web_contents()->GetPrimaryMainFrame()->ForEachRenderFrameHost(
|
||||
base::BindRepeating(&PrintViewManagerBase::SendPrintingEnabled,
|
||||
- base::Unretained(this),
|
||||
- printing_enabled_.GetValue()));
|
||||
+ base::Unretained(this), true));
|
||||
[this](content::RenderFrameHost* rfh) {
|
||||
- SendPrintingEnabled(printing_enabled_.GetValue(), rfh);
|
||||
+ SendPrintingEnabled(true, rfh);
|
||||
});
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::NavigationStopped() {
|
||||
@@ -593,11 +620,14 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
@@ -535,11 +563,14 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
void PrintViewManagerBase::GetDefaultPrintSettings(
|
||||
GetDefaultPrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
@ -292,7 +292,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
|
||||
!service_manager_client_id_.has_value()) {
|
||||
@@ -635,18 +665,20 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -577,18 +608,20 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
base::Value::Dict job_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
@ -314,7 +314,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
content::BrowserContext* context =
|
||||
web_contents() ? web_contents()->GetBrowserContext() : nullptr;
|
||||
PrefService* prefs =
|
||||
@@ -656,6 +688,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -598,6 +631,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
if (value > 0)
|
||||
job_settings.Set(kSettingRasterizePdfDpi, value);
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
|
||||
auto callback_wrapper =
|
||||
base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply,
|
||||
@@ -687,14 +720,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -629,14 +663,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);
|
||||
|
@ -339,7 +339,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -732,7 +765,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -674,7 +708,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
PrintManager::PrintingFailed(cookie, reason);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID) // Android does not implement this function.
|
||||
|
@ -347,7 +347,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
#endif
|
||||
|
||||
ReleasePrinterQuery();
|
||||
@@ -747,6 +779,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
|
||||
@@ -689,6 +722,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::ShowInvalidPrinterSettingsError() {
|
||||
|
@ -359,7 +359,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&ShowWarningMessageBox,
|
||||
l10n_util::GetStringUTF16(
|
||||
@@ -757,10 +794,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged(
|
||||
@@ -699,10 +737,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
content::RenderFrameHost::LifecycleState /*old_state*/,
|
||||
content::RenderFrameHost::LifecycleState new_state) {
|
||||
|
@ -372,7 +372,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::DidStartLoading() {
|
||||
@@ -821,7 +860,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
@@ -758,7 +798,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.
|
||||
|
@ -386,7 +386,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
ReleasePrintJob();
|
||||
}
|
||||
|
||||
@@ -835,7 +879,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
@@ -772,7 +817,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
|
||||
// Is the document already complete?
|
||||
if (print_job_->document() && print_job_->document()->IsComplete()) {
|
||||
|
@ -395,7 +395,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -883,7 +927,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -820,7 +865,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
|
||||
// Disconnect the current `print_job_`.
|
||||
auto weak_this = weak_ptr_factory_.GetWeakPtr();
|
||||
|
@ -407,7 +407,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
if (!weak_this)
|
||||
return false;
|
||||
|
||||
@@ -904,7 +951,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -841,7 +889,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
#endif
|
||||
print_job_->AddObserver(*this);
|
||||
|
||||
|
@ -416,7 +416,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -964,6 +1011,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -901,6 +949,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -428,7 +428,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
if (!print_job_)
|
||||
return;
|
||||
|
||||
@@ -971,7 +1023,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -908,7 +961,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
// printing_rfh_ should only ever point to a RenderFrameHost with a live
|
||||
// RenderFrame.
|
||||
DCHECK(rfh->IsRenderFrameLive());
|
||||
|
@ -437,7 +437,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
}
|
||||
|
||||
print_job_->RemoveObserver(*this);
|
||||
@@ -1013,7 +1065,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -950,7 +1003,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
|
@ -446,7 +446,7 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
return true;
|
||||
|
||||
if (!cookie) {
|
||||
@@ -1121,7 +1173,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled,
|
||||
@@ -1058,7 +1111,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled,
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
|
||||
|
@ -456,10 +456,10 @@ index 8a17d3bf5a7fe924d5e562589864747e294931d1..5b270a41efb53bef55cbcb65ca655212
|
|||
for (auto& observer : GetObservers())
|
||||
observer.OnPrintNow(rfh);
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
|
||||
index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187845e6a75 100644
|
||||
index 871e00c49028ccf58d207f904c22e0107f3c2b65..c9b136ab165410eb533f84254454dac0b6674f14 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.h
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.h
|
||||
@@ -43,6 +43,8 @@ namespace printing {
|
||||
@@ -42,6 +42,8 @@ namespace printing {
|
||||
class PrintQueriesQueue;
|
||||
class PrinterQuery;
|
||||
|
||||
|
@ -468,7 +468,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187
|
|||
// Base class for managing the print commands for a WebContents.
|
||||
class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
public:
|
||||
@@ -70,7 +72,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -65,7 +67,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
// Prints the current document immediately. Since the rendering is
|
||||
// asynchronous, the actual printing will not be completed on the return of
|
||||
// this function. Returns false if printing is impossible at the moment.
|
||||
|
@ -480,7 +480,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187
|
|||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Prints the document in `print_data` with settings specified in
|
||||
@@ -128,6 +133,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -123,6 +128,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
void ShowInvalidPrinterSettingsError() override;
|
||||
void PrintingFailed(int32_t cookie,
|
||||
mojom::PrintFailureReason reason) override;
|
||||
|
@ -488,7 +488,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187
|
|||
|
||||
// Adds and removes observers for `PrintViewManagerBase` events. The order in
|
||||
// which notifications are sent to observers is undefined. Observers must be
|
||||
@@ -135,6 +141,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -130,6 +136,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
void AddObserver(Observer& observer);
|
||||
void RemoveObserver(Observer& observer);
|
||||
|
||||
|
@ -503,7 +503,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187
|
|||
protected:
|
||||
explicit PrintViewManagerBase(content::WebContents* web_contents);
|
||||
|
||||
@@ -256,7 +270,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -251,7 +265,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
// Runs `callback` with `params` to reply to ScriptedPrint().
|
||||
void ScriptedPrintReply(ScriptedPrintCallback callback,
|
||||
int process_id,
|
||||
|
@ -513,7 +513,7 @@ index f146d74541cae93a957c5b2596a005e25c20f7cf..120f2bb8b27f814c4f7dc93cef7fb187
|
|||
|
||||
// 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
|
||||
@@ -336,8 +351,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -324,8 +339,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;
|
||||
|
||||
|
@ -553,10 +553,10 @@ index 0e788384809f9f7218c6483822ffea08f86b4f79..c6f08845cb292ff406db5560c9a744dc
|
|||
PrintWithParamsCallback callback) override;
|
||||
void PrintForSystemDialog() override;
|
||||
diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom
|
||||
index 95d9f19082978772297cff1bcd9c5f73db50bd62..96fe7fbb54fe0908e2153d901c130b6a5c621522 100644
|
||||
index 255a68703b848064de894122386279168590bb4f..e138abd3dbad430254936aa5fe6337c576bea8a7 100644
|
||||
--- a/components/printing/common/print.mojom
|
||||
+++ b/components/printing/common/print.mojom
|
||||
@@ -285,7 +285,7 @@ union PrintWithParamsResult {
|
||||
@@ -286,7 +286,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.
|
||||
|
@ -565,7 +565,7 @@ index 95d9f19082978772297cff1bcd9c5f73db50bd62..96fe7fbb54fe0908e2153d901c130b6a
|
|||
|
||||
// Requests the frame to be printed with specified parameters. This is used
|
||||
// to programmatically produce PDF by request from the browser (e.g. over
|
||||
@@ -368,7 +368,7 @@ interface PrintManagerHost {
|
||||
@@ -369,7 +369,7 @@ interface PrintManagerHost {
|
||||
// Request the print settings from the user. This step is about showing
|
||||
// UI to the user to select the final print settings.
|
||||
[Sync]
|
||||
|
@ -575,7 +575,7 @@ index 95d9f19082978772297cff1bcd9c5f73db50bd62..96fe7fbb54fe0908e2153d901c130b6a
|
|||
// Tells the browser that there are invalid printer settings.
|
||||
ShowInvalidPrinterSettingsError();
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
|
||||
index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86bc0e0f90 100644
|
||||
index 1908f32f88245e4edf2c75cc4f5378310b27f569..17d1dea5013fabf0379846b6dc9d68d120e488bc 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -42,6 +42,7 @@
|
||||
|
@ -586,7 +586,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
|
|||
#include "printing/units.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
|
||||
@@ -1282,7 +1283,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
@@ -1283,7 +1284,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
if (!weak_this)
|
||||
return;
|
||||
|
||||
|
@ -596,7 +596,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
|
|||
if (!weak_this)
|
||||
return;
|
||||
|
||||
@@ -1313,7 +1315,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
@@ -1314,7 +1316,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
receivers_.Add(this, std::move(receiver));
|
||||
}
|
||||
|
||||
|
@ -605,7 +605,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
|
|||
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
return;
|
||||
@@ -1328,7 +1330,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
@@ -1329,7 +1331,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
// plugin node and print that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
|
||||
|
@ -614,7 +614,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
|
|||
|
||||
if (!render_frame_gone_)
|
||||
frame->DispatchAfterPrintEvent();
|
||||
@@ -1405,7 +1407,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
@@ -1411,7 +1413,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
}
|
||||
|
||||
Print(frame, print_preview_context_.source_node(),
|
||||
|
@ -624,7 +624,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
|
|||
if (!render_frame_gone_)
|
||||
print_preview_context_.DispatchAfterPrintEvent();
|
||||
// WARNING: |this| may be gone at this point. Do not do any more work here and
|
||||
@@ -1454,6 +1457,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
|
||||
@@ -1460,6 +1463,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
return;
|
||||
|
||||
|
@ -633,7 +633,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
|
|||
print_preview_context_.OnPrintPreview();
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -2066,7 +2071,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -2072,7 +2077,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
return;
|
||||
|
||||
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
|
||||
|
@ -643,7 +643,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
|
|||
// Check if |this| is still valid.
|
||||
if (!weak_this)
|
||||
return;
|
||||
@@ -2081,7 +2087,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -2087,7 +2093,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
|
@ -654,7 +654,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
|
|||
// If still not finished with earlier print request simply ignore.
|
||||
if (prep_frame_view_)
|
||||
return;
|
||||
@@ -2089,7 +2097,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -2095,7 +2103,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
FrameReference frame_ref(frame);
|
||||
|
||||
uint32_t expected_page_count = 0;
|
||||
|
@ -663,7 +663,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
|
|||
DidFinishPrinting(FAIL_PRINT_INIT);
|
||||
return; // Failed to init print page settings.
|
||||
}
|
||||
@@ -2108,8 +2116,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -2114,8 +2122,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
print_pages_params_->params->print_scaling_option;
|
||||
|
||||
auto self = weak_ptr_factory_.GetWeakPtr();
|
||||
|
@ -680,7 +680,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
|
|||
// Check if |this| is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -2374,36 +2389,52 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
@@ -2380,36 +2395,52 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -745,7 +745,7 @@ index fe8cd8bc27b1e955b177c7952ccb862faf0f228b..d5a2a9a8452b925a693335547d193a86
|
|||
notify_browser_of_print_failure_ = false;
|
||||
GetPrintManagerHost()->ShowInvalidPrinterSettingsError();
|
||||
return false;
|
||||
@@ -2528,7 +2559,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
@@ -2534,7 +2565,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
std::move(params),
|
||||
base::BindOnce(
|
||||
[](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output,
|
||||
|
@ -796,10 +796,10 @@ index 66026548181a897c161d7202646f33fd8847ccb8..113a8165b5db6294087773e5a4b2f003
|
|||
#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 0704a34a2fc4afdf618004d5bee69a7777cc3491..47edb94bd9078364fb03f35849b389a6b2992922 100644
|
||||
index 77deaa26319118b937d6b0c394c33e72c94232e3..70585fbf9d40581725f48d9d73a350ab0d3d4421 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -2783,8 +2783,9 @@ source_set("browser") {
|
||||
@@ -2808,8 +2808,9 @@ source_set("browser") {
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
|
||||
|
@ -812,19 +812,19 @@ index 0704a34a2fc4afdf618004d5bee69a7777cc3491..47edb94bd9078364fb03f35849b389a6
|
|||
if (is_chromeos) {
|
||||
sources += [
|
||||
diff --git a/content/browser/utility_sandbox_delegate_win.cc b/content/browser/utility_sandbox_delegate_win.cc
|
||||
index 2ae5fc805ccbd81448d3b9d5aa482bcfd7a747f8..b2ed764463f977bd242d9da79270244062c210d6 100644
|
||||
index d072c23a079bbe269b90d39882bf688a0c17280e..9ebc07769f13d384ebe9bca318a3634234b913be 100644
|
||||
--- a/content/browser/utility_sandbox_delegate_win.cc
|
||||
+++ b/content/browser/utility_sandbox_delegate_win.cc
|
||||
@@ -95,6 +95,7 @@ bool NetworkPreSpawnTarget(sandbox::TargetPolicy* policy) {
|
||||
@@ -99,6 +99,7 @@ bool NetworkPreSpawnTarget(sandbox::TargetConfig* config) {
|
||||
return true;
|
||||
}
|
||||
|
||||
+#if BUILDFLAG(ENABLE_PRINTING)
|
||||
// Sets the sandbox policy for the print backend service process.
|
||||
bool PrintBackendPreSpawnTarget(sandbox::TargetPolicy* policy) {
|
||||
// Print Backend policy lockdown level must be at least USER_LIMITED and
|
||||
@@ -105,6 +106,7 @@ bool PrintBackendPreSpawnTarget(sandbox::TargetPolicy* policy) {
|
||||
policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW);
|
||||
bool PrintBackendPreSpawnTarget(sandbox::TargetConfig* config) {
|
||||
DCHECK(!config->IsConfigured());
|
||||
@@ -170,6 +171,7 @@ bool XrCompositingPreSpawnTarget(sandbox::TargetConfig* config,
|
||||
|
||||
return true;
|
||||
}
|
||||
+#endif
|
||||
|
@ -868,7 +868,7 @@ index 0e6dd8092f6025790560ca2bab2d68daf47caff2..a4aa6e21b1d37e534b543ad8b112070e
|
|||
bool skip_system_calls() const {
|
||||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
diff --git a/sandbox/policy/mac/sandbox_mac.mm b/sandbox/policy/mac/sandbox_mac.mm
|
||||
index 2a1a5aaf18d43a68b13783d55279e481bd91c2e5..156c6ca844d97376268baa57dcf220561a63fa04 100644
|
||||
index 106ede6555aa87ff7e0728b34c909cf3796678df..ef34788e9ac5ada4bdb85f524ad7fadd27c61509 100644
|
||||
--- a/sandbox/policy/mac/sandbox_mac.mm
|
||||
+++ b/sandbox/policy/mac/sandbox_mac.mm
|
||||
@@ -22,7 +22,6 @@
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue