[go: nahoru, domu]

Consolidate PrintingContext::UpdatePrinterSettings() parameter.

Put all the parameters into a struct. Then if the parameters need to be
updated, it is easier to add it to the struct, than to update multiple
UpdatePrinterSettings() override declarations. Along the way, update the
`external_preview` parameter to be macOS-only.

Bug: 1245679
Change-Id: Idefb383d95944d6953b23dcd59b8b79f1045c0c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3280166
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Alan Screen <awscreen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#941920}
diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h
index 7fde07c7..599a051 100644
--- a/printing/printing_context_mac.h
+++ b/printing/printing_context_mac.h
@@ -32,9 +32,8 @@
                           PrintSettingsCallback callback) override;
   mojom::ResultCode UseDefaultSettings() override;
   gfx::Size GetPdfPaperSizeDeviceUnits() override;
-  mojom::ResultCode UpdatePrinterSettings(bool external_preview,
-                                          bool show_system_dialog,
-                                          int page_count) override;
+  mojom::ResultCode UpdatePrinterSettings(
+      const PrinterSettings& printer_settings) override;
   mojom::ResultCode NewDocument(const std::u16string& document_name) override;
   mojom::ResultCode NewPage() override;
   mojom::ResultCode PageDone() override;