mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
5206106: Make sure RenderFrameHosts are active when printing | https://chromium-review.googlesource.com/c/chromium/src/+/5206106
This commit is contained in:
committed by
John Kleinschmidt
parent
6b41b72130
commit
9a788c0c60
@@ -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 2fafbb88224a6290733379631a08e5e20b08218d..81bc36fa8525d6b7dd9482284553fc67a403c4b1 100644
|
||||
index 524994eb853a0364c916dfa7a16faa2983318501..5ecf71fbe6a0cee5034dffb87f2002dd9f164278 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -966,7 +966,6 @@ if (is_win) {
|
||||
@@ -971,7 +971,6 @@ if (is_win) {
|
||||
"//media:media_unittests",
|
||||
"//media/midi:midi_unittests",
|
||||
"//net:net_unittests",
|
||||
@@ -22,7 +22,7 @@ index 2fafbb88224a6290733379631a08e5e20b08218d..81bc36fa8525d6b7dd9482284553fc67
|
||||
"//sql:sql_unittests",
|
||||
"//third_party/breakpad:symupload($host_toolchain)",
|
||||
"//ui/base:ui_base_unittests",
|
||||
@@ -975,6 +974,10 @@ if (is_win) {
|
||||
@@ -980,6 +979,10 @@ if (is_win) {
|
||||
"//ui/views:views_unittests",
|
||||
"//url:url_unittests",
|
||||
]
|
||||
@@ -91,10 +91,10 @@ index 874b9efcf9e70650728885519009360ee770a79f..6c4d24d44e69d796bc6bfec5f7092f5b
|
||||
: 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 e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b1ebfb61e 100644
|
||||
index 301a4a47fb4dfb6007c2214b04ffdff744cc3043..30ebd441d530b5b9c90de6f03b714ab3520fbed7 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -22,7 +22,9 @@
|
||||
@@ -23,7 +23,9 @@
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "chrome/browser/bad_message.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
@@ -104,7 +104,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
#include "chrome/browser/printing/print_job.h"
|
||||
#include "chrome/browser/printing/print_job_manager.h"
|
||||
#include "chrome/browser/printing/print_view_manager_common.h"
|
||||
@@ -80,6 +82,20 @@ namespace printing {
|
||||
@@ -81,6 +83,20 @@ namespace printing {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -125,7 +125,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
void OnDidGetDefaultPrintSettings(
|
||||
scoped_refptr<PrintQueriesQueue> queue,
|
||||
bool want_pdf_settings,
|
||||
@@ -88,9 +104,11 @@ void OnDidGetDefaultPrintSettings(
|
||||
@@ -89,9 +105,11 @@ void OnDidGetDefaultPrintSettings(
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
||||
if (printer_query->last_status() != mojom::ResultCode::kSuccess) {
|
||||
@@ -137,7 +137,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
std::move(callback).Run(nullptr);
|
||||
return;
|
||||
}
|
||||
@@ -100,9 +118,11 @@ void OnDidGetDefaultPrintSettings(
|
||||
@@ -101,9 +119,11 @@ void OnDidGetDefaultPrintSettings(
|
||||
params->document_cookie = printer_query->cookie();
|
||||
|
||||
if (!PrintMsgPrintParamsIsValid(*params)) {
|
||||
@@ -149,7 +149,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
std::move(callback).Run(nullptr);
|
||||
return;
|
||||
}
|
||||
@@ -114,11 +134,15 @@ void OnDidGetDefaultPrintSettings(
|
||||
@@ -115,11 +135,15 @@ void OnDidGetDefaultPrintSettings(
|
||||
void OnDidScriptedPrint(
|
||||
scoped_refptr<PrintQueriesQueue> queue,
|
||||
std::unique_ptr<PrinterQuery> printer_query,
|
||||
@@ -166,7 +166,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
std::move(callback).Run(nullptr);
|
||||
return;
|
||||
}
|
||||
@@ -171,9 +195,11 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
@@ -176,9 +200,11 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
: PrintManager(web_contents),
|
||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||
DCHECK(queue_);
|
||||
@@ -179,7 +179,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
}
|
||||
|
||||
PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -197,12 +223,17 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() {
|
||||
@@ -202,12 +228,17 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() {
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
|
||||
@@ -199,7 +199,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
|
||||
for (auto& observer : GetTestObservers()) {
|
||||
observer.OnPrintNow(rfh);
|
||||
@@ -331,12 +362,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
|
||||
@@ -336,12 +367,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
|
||||
}
|
||||
PRINTER_LOG(EVENT) << "Paper printable area updated for vendor id "
|
||||
<< print_settings->requested_media().vendor_id;
|
||||
@@ -214,7 +214,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
base::Value::Dict job_settings,
|
||||
std::unique_ptr<PrintSettings> print_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
@@ -344,7 +376,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
@@ -349,7 +381,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
settings->pages = GetPageRangesFromJobSettings(job_settings);
|
||||
settings->params = mojom::PrintParams::New();
|
||||
RenderParamsFromPrintSettings(*print_settings, settings->params.get());
|
||||
@@ -224,7 +224,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
if (!PrintMsgPrintParamsIsValid(*settings->params)) {
|
||||
mojom::PrinterType printer_type = static_cast<mojom::PrinterType>(
|
||||
*job_settings.FindInt(kSettingPrinterType));
|
||||
@@ -356,6 +389,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
@@ -361,6 +394,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
set_cookie(settings->params->document_cookie);
|
||||
std::move(callback).Run(std::move(settings));
|
||||
}
|
||||
@@ -642,10 +679,12 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
@@ -647,6 +684,7 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
void PrintViewManagerBase::GetDefaultPrintSettings(
|
||||
GetDefaultPrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -243,12 +243,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
if (!printing_enabled_.GetValue()) {
|
||||
GetDefaultPrintSettingsReply(std::move(callback), nullptr);
|
||||
return;
|
||||
}
|
||||
+#endif
|
||||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
if (ShouldPrintJobOop() &&
|
||||
#if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
|
||||
@@ -697,10 +736,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -710,10 +748,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
base::Value::Dict job_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -261,7 +256,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
|
||||
std::optional<int> printer_type_value =
|
||||
job_settings.FindInt(kSettingPrinterType);
|
||||
@@ -711,6 +752,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -724,6 +764,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
|
||||
mojom::PrinterType printer_type =
|
||||
static_cast<mojom::PrinterType>(*printer_type_value);
|
||||
@@ -269,7 +264,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
if (printer_type != mojom::PrinterType::kExtension &&
|
||||
printer_type != mojom::PrinterType::kPdf &&
|
||||
printer_type != mojom::PrinterType::kLocal) {
|
||||
@@ -730,6 +772,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -743,6 +784,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
if (value > 0)
|
||||
job_settings.Set(kSettingRasterizePdfDpi, value);
|
||||
}
|
||||
@@ -277,7 +272,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
|
||||
std::unique_ptr<PrintSettings> print_settings =
|
||||
PrintSettingsFromJobSettings(job_settings);
|
||||
@@ -749,7 +792,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -762,7 +804,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -300,7 +295,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
// TODO(crbug.com/1424368): Remove this if the printable areas can be made
|
||||
// fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()`
|
||||
// for in-browser queries.
|
||||
@@ -771,8 +828,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -784,8 +840,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -309,7 +304,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::SetAccessibilityTree(
|
||||
@@ -788,7 +843,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
|
||||
@@ -801,7 +855,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
|
||||
void PrintViewManagerBase::IsPrintingEnabled(
|
||||
IsPrintingEnabledCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -318,7 +313,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -839,6 +894,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -852,6 +906,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
|
||||
PrintManager::PrintingFailed(cookie, reason);
|
||||
|
||||
@@ -326,7 +321,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
// `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
|
||||
@@ -848,7 +904,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -861,7 +916,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
print_job_->document()->cookie() == cookie) {
|
||||
ShowPrintErrorDialogForGenericError();
|
||||
}
|
||||
@@ -335,7 +330,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
ReleasePrinterQuery();
|
||||
}
|
||||
|
||||
@@ -860,15 +916,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
|
||||
@@ -873,15 +928,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
|
||||
test_observers_.RemoveObserver(&observer);
|
||||
}
|
||||
|
||||
@@ -360,7 +355,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::RenderFrameDeleted(
|
||||
@@ -920,7 +985,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
@@ -933,7 +997,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.
|
||||
@@ -374,7 +369,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
ReleasePrintJob();
|
||||
}
|
||||
|
||||
@@ -929,9 +999,10 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
@@ -942,9 +1011,10 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::OnFailed() {
|
||||
@@ -386,7 +381,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
TerminatePrintJob(true);
|
||||
}
|
||||
|
||||
@@ -941,7 +1012,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
@@ -954,7 +1024,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
|
||||
// Is the document already complete?
|
||||
if (print_job_->document() && print_job_->document()->IsComplete()) {
|
||||
@@ -395,7 +390,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -994,7 +1065,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
|
||||
@@ -1007,7 +1077,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
|
||||
|
||||
// Disconnect the current `print_job_`.
|
||||
auto weak_this = weak_ptr_factory_.GetWeakPtr();
|
||||
@@ -407,7 +402,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
if (!weak_this)
|
||||
return false;
|
||||
|
||||
@@ -1014,7 +1088,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
|
||||
@@ -1027,7 +1100,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
|
||||
#endif
|
||||
print_job_->AddObserver(*this);
|
||||
|
||||
@@ -416,7 +411,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1082,6 +1156,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -1095,6 +1168,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -428,7 +423,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
if (!print_job_)
|
||||
return;
|
||||
|
||||
@@ -1089,7 +1168,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -1102,7 +1180,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
// printing_rfh_ should only ever point to a RenderFrameHost with a live
|
||||
// RenderFrame.
|
||||
DCHECK(rfh->IsRenderFrameLive());
|
||||
@@ -437,7 +432,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
}
|
||||
|
||||
print_job_->RemoveObserver(*this);
|
||||
@@ -1131,7 +1210,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -1144,7 +1222,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
@@ -446,7 +441,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
return true;
|
||||
|
||||
if (!cookie) {
|
||||
@@ -1285,6 +1364,8 @@ void PrintViewManagerBase::CompleteScriptedPrint(
|
||||
@@ -1298,6 +1376,8 @@ void PrintViewManagerBase::CompleteScriptedPrint(
|
||||
auto callback_wrapper = base::BindOnce(
|
||||
&PrintViewManagerBase::ScriptedPrintReply, weak_ptr_factory_.GetWeakPtr(),
|
||||
std::move(callback), render_process_host->GetID());
|
||||
@@ -455,7 +450,7 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
#if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
DisableThirdPartyBlocking();
|
||||
#endif
|
||||
@@ -1299,7 +1380,7 @@ void PrintViewManagerBase::CompleteScriptedPrint(
|
||||
@@ -1312,7 +1392,7 @@ 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),
|
||||
@@ -465,19 +460,19 @@ index e4ba6fdfac5ebaa0e960ef1009fc1399dd391553..62a8fc34d817c1423375bdb55483ac7b
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
|
||||
index 99612fd36fdb51fc735ddad8412f8119293f42f0..e6ec8d53b5a2c71a11ab61c7f967c7de7fa857be 100644
|
||||
index 24a2bc8b26462e6cafbcd5eb89e838b73266ec70..402aab3b14e6987bde0e22e6c82ac438d465330a 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.h
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.h
|
||||
@@ -44,6 +44,8 @@ namespace printing {
|
||||
class PrintQueriesQueue;
|
||||
class PrinterQuery;
|
||||
@@ -49,6 +49,8 @@ class PrinterQuery;
|
||||
// rollout.
|
||||
BASE_DECLARE_FEATURE(kCheckPrintRfhIsActive);
|
||||
|
||||
+using CompletionCallback = base::OnceCallback<void(bool, const std::string&)>;
|
||||
+
|
||||
// Base class for managing the print commands for a WebContents.
|
||||
class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
public:
|
||||
@@ -77,7 +79,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -82,7 +84,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.
|
||||
@@ -489,7 +484,7 @@ index 99612fd36fdb51fc735ddad8412f8119293f42f0..e6ec8d53b5a2c71a11ab61c7f967c7de
|
||||
|
||||
// Like PrintNow(), but for the node under the context menu, instead of the
|
||||
// entire frame.
|
||||
@@ -131,8 +136,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -136,8 +141,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
void IsPrintingEnabled(IsPrintingEnabledCallback callback) override;
|
||||
void ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
ScriptedPrintCallback callback) override;
|
||||
@@ -500,7 +495,7 @@ index 99612fd36fdb51fc735ddad8412f8119293f42f0..e6ec8d53b5a2c71a11ab61c7f967c7de
|
||||
|
||||
// Adds and removes observers for `PrintViewManagerBase` events. The order in
|
||||
// which notifications are sent to observers is undefined. Observers must be
|
||||
@@ -140,6 +147,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);
|
||||
|
||||
@@ -515,7 +510,7 @@ index 99612fd36fdb51fc735ddad8412f8119293f42f0..e6ec8d53b5a2c71a11ab61c7f967c7de
|
||||
protected:
|
||||
explicit PrintViewManagerBase(content::WebContents* web_contents);
|
||||
|
||||
@@ -263,6 +278,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -268,6 +283,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
bool success);
|
||||
#endif
|
||||
void CompleteUpdatePrintSettings(
|
||||
@@ -523,7 +518,7 @@ index 99612fd36fdb51fc735ddad8412f8119293f42f0..e6ec8d53b5a2c71a11ab61c7f967c7de
|
||||
base::Value::Dict job_settings,
|
||||
std::unique_ptr<PrintSettings> print_settings,
|
||||
UpdatePrintSettingsCallback callback);
|
||||
@@ -357,8 +373,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -362,8 +378,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;
|
||||
|
||||
@@ -829,10 +824,10 @@ index 3cf735c0bf3ba4ed4a871f4608f43cf9767de62f..fccabc0c51ba2fc1ccd8646d30da782f
|
||||
// Calculate number of pages in source document.
|
||||
uint32_t CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index 5b74aba69396929b5adc8adf732667c6cdb006e2..2800a847001f46c34053d78ca99bf471844e6888 100644
|
||||
index 70d29fafd953f86fdd43452af8d395b6a142d848..50bef5a70ffdde6af55105ac5876de64317a0ce8 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -2973,8 +2973,9 @@ source_set("browser") {
|
||||
@@ -2974,8 +2974,9 @@ source_set("browser") {
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user