Replace PrintingContext::Result with mojom::ResultCode
Pushing document printing to out-of-process means that there could now
be a new possible access-denied result for PrintingContext operations.
While the PrintingResult enum could be extended to include this, it
can instead just use the same mojom::ResultCode that is used for other
operations which interact with OS APIs since they would have the same
effective enum values.
In preparation for adding access-denied support to PrintingContext,
first replace all usage of PrintingContext::Result with
mojom::ResultCode. There is no logical change with this replacement.
Bug: 809738
Change-Id: I997d4d207232142dbd36e59e3689ec71bb15fed9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3171346
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#923261}
diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h
index 0fb5c91..7fde07c7 100644
--- a/printing/printing_context_mac.h
+++ b/printing/printing_context_mac.h
@@ -30,15 +30,15 @@
bool has_selection,
bool is_scripted,
PrintSettingsCallback callback) override;
- Result UseDefaultSettings() override;
+ mojom::ResultCode UseDefaultSettings() override;
gfx::Size GetPdfPaperSizeDeviceUnits() override;
- Result UpdatePrinterSettings(bool external_preview,
- bool show_system_dialog,
- int page_count) override;
- Result NewDocument(const std::u16string& document_name) override;
- Result NewPage() override;
- Result PageDone() override;
- Result DocumentDone() override;
+ mojom::ResultCode UpdatePrinterSettings(bool external_preview,
+ bool show_system_dialog,
+ int page_count) override;
+ mojom::ResultCode NewDocument(const std::u16string& document_name) override;
+ mojom::ResultCode NewPage() override;
+ mojom::ResultCode PageDone() override;
+ mojom::ResultCode DocumentDone() override;
void Cancel() override;
void ReleaseContext() override;
printing::NativeDrawingContext context() const override;