fix: delegate to PrintViewManagerBase
on failed print (#34893)
fix: delegate to PrintViewManagerBase on failed print
This commit is contained in:
parent
eb8c9452cb
commit
05d4966251
1 changed files with 11 additions and 0 deletions
|
@ -163,12 +163,23 @@ void PrintViewManagerElectron::ScriptedPrint(
|
|||
}
|
||||
|
||||
void PrintViewManagerElectron::ShowInvalidPrinterSettingsError() {
|
||||
if (headless_jobs_.size() == 0) {
|
||||
PrintViewManagerBase::ShowInvalidPrinterSettingsError();
|
||||
return;
|
||||
}
|
||||
|
||||
ReleaseJob(INVALID_PRINTER_SETTINGS);
|
||||
}
|
||||
|
||||
void PrintViewManagerElectron::PrintingFailed(
|
||||
int32_t cookie,
|
||||
printing::mojom::PrintFailureReason reason) {
|
||||
auto entry = std::find(headless_jobs_.begin(), headless_jobs_.end(), cookie);
|
||||
if (entry == headless_jobs_.end()) {
|
||||
PrintViewManagerBase::PrintingFailed(cookie, reason);
|
||||
return;
|
||||
}
|
||||
|
||||
ReleaseJob(reason == printing::mojom::PrintFailureReason::kInvalidPageRange
|
||||
? PAGE_COUNT_EXCEEDED
|
||||
: PRINTING_FAILED);
|
||||
|
|
Loading…
Reference in a new issue