Bug 144114 part 2 - Rename nsPrintOptions and its subclasses to nsPrintSettingsService*. r=bobowen
authorJonathan Watt <jwatt@jwatt.org>
Tue, 19 Dec 2017 10:42:15 +0000
changeset 399216 2453d0c0d5acc940b6aacef3d32d9b120b80d36f
parent 399215 d7a4884fbc25e2cc2895b5e115960d26b927201b
child 399217 ca6bb250afe4477343775f8bb36846749acb2a1f
push id33249
push userapavel@mozilla.com
push dateSun, 14 Jan 2018 05:34:14 +0000
treeherdermozilla-central@3d28ca7c05d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbobowen
bugs144114
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 144114 part 2 - Rename nsPrintOptions and its subclasses to nsPrintSettingsService*. r=bobowen MozReview-Commit-ID: HQSmyrMBdS8
widget/android/nsPrintSettingsServiceAndroid.cpp
widget/android/nsPrintSettingsServiceAndroid.h
widget/android/nsWidgetFactory.cpp
widget/cocoa/nsPrintSettingsServiceX.h
widget/cocoa/nsPrintSettingsServiceX.mm
widget/cocoa/nsWidgetFactory.mm
widget/gtk/nsPrintSettingsServiceGTK.cpp
widget/gtk/nsPrintSettingsServiceGTK.h
widget/gtk/nsWidgetFactory.cpp
widget/nsPrintSettingsImpl.cpp
widget/nsPrintSettingsService.cpp
widget/nsPrintSettingsService.h
widget/windows/nsPrintSettingsServiceWin.cpp
widget/windows/nsPrintSettingsServiceWin.h
widget/windows/nsPrintSettingsWin.cpp
widget/windows/nsWidgetFactory.cpp
--- a/widget/android/nsPrintSettingsServiceAndroid.cpp
+++ b/widget/android/nsPrintSettingsServiceAndroid.cpp
@@ -11,26 +11,18 @@ public:
   nsPrintSettingsAndroid()
   {
     // The aim here is to set up the objects enough that silent printing works
     SetOutputFormat(nsIPrintSettings::kOutputFormatPDF);
     SetPrinterName(NS_LITERAL_STRING("PDF printer"));
   }
 };
 
-nsPrintOptionsAndroid::nsPrintOptionsAndroid()
-{
-}
-
-nsPrintOptionsAndroid::~nsPrintOptionsAndroid()
-{
-}
-
 nsresult
-nsPrintOptionsAndroid::_CreatePrintSettings(nsIPrintSettings** _retval)
+nsPrintSettingsServiceAndroid::_CreatePrintSettings(nsIPrintSettings** _retval)
 {
   nsPrintSettings * printSettings = new nsPrintSettingsAndroid();
   NS_ENSURE_TRUE(printSettings, NS_ERROR_OUT_OF_MEMORY);
   NS_ADDREF(*_retval = printSettings);
   (void)InitPrintSettingsFromPrefs(*_retval, false,
                                    nsIPrintSettings::kInitSaveAll);
   return NS_OK;
 }
--- a/widget/android/nsPrintSettingsServiceAndroid.h
+++ b/widget/android/nsPrintSettingsServiceAndroid.h
@@ -1,23 +1,20 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef nsPrintOptionsAndroid_h__
-#define nsPrintOptionsAndroid_h__
+#ifndef nsPrintSettingsServiceAndroid_h
+#define nsPrintSettingsServiceAndroid_h
 
 #include "nsPrintSettingsService.h"
 #include "nsIPrintSettings.h"
 
-//*****************************************************************************
-//***    nsPrintOptions
-//*****************************************************************************
-class nsPrintOptionsAndroid : public nsPrintOptions
+class nsPrintSettingsServiceAndroid final : public nsPrintSettingsService
 {
 public:
-  nsPrintOptionsAndroid();
-  virtual ~nsPrintOptionsAndroid();
+  nsPrintSettingsServiceAndroid() {}
+  virtual ~nsPrintSettingsServiceAndroid() {}
 
   nsresult _CreatePrintSettings(nsIPrintSettings** _retval) override;
 };
 
-#endif /* nsPrintOptionsAndroid_h__ */
+#endif // nsPrintSettingsServiceAndroid_h
--- a/widget/android/nsWidgetFactory.cpp
+++ b/widget/android/nsWidgetFactory.cpp
@@ -32,17 +32,17 @@
 #include "nsNativeThemeAndroid.h"
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindow)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerAndroid)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIdleServiceAndroid, nsIdleServiceAndroid::GetInstance)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintOptionsAndroid, Init)
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSettingsServiceAndroid, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSession, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecAndroid)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAndroidBridge)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsAndroidProtocolHandler)
 
 #include "GfxInfo.h"
 namespace mozilla {
@@ -96,17 +96,17 @@ static const mozilla::Module::CIDEntry k
   { &kNS_CHILD_CID, false, nullptr, nsWindowConstructor },
   { &kNS_APPSHELL_CID, false, nullptr, nsAppShellConstructor },
   { &kNS_SCREENMANAGER_CID, false, nullptr, nsScreenManagerAndroidConstructor },
   { &kNS_THEMERENDERER_CID, false, nullptr, nsNativeThemeAndroidConstructor },
   { &kNS_IDLE_SERVICE_CID, false, nullptr, nsIdleServiceAndroidConstructor },
   { &kNS_TRANSFERABLE_CID, false, nullptr, nsTransferableConstructor },
   { &kNS_CLIPBOARD_CID, false, nullptr, nsClipboardConstructor },
   { &kNS_CLIPBOARDHELPER_CID, false, nullptr, nsClipboardHelperConstructor },
-  { &kNS_PRINTSETTINGSSERVICE_CID, false, nullptr, nsPrintOptionsAndroidConstructor },
+  { &kNS_PRINTSETTINGSSERVICE_CID, false, nullptr, nsPrintSettingsServiceAndroidConstructor },
   { &kNS_PRINTSESSION_CID, false, nullptr, nsPrintSessionConstructor },
   { &kNS_DEVICE_CONTEXT_SPEC_CID, false, nullptr, nsDeviceContextSpecAndroidConstructor },
   { &kNS_HTMLFORMATCONVERTER_CID, false, nullptr, nsHTMLFormatConverterConstructor },
   { &kNS_GFXINFO_CID, false, nullptr, mozilla::widget::GfxInfoConstructor },
   { &kNS_ANDROIDBRIDGE_CID, false, nullptr, nsAndroidBridgeConstructor },
   { &kNS_ANDROIDPROTOCOLHANDLER_CID, false, nullptr, nsAndroidProtocolHandlerConstructor },
   { &kNS_SYSTEMALERTSSERVICE_CID, false, nullptr, mozilla::widget::AndroidAlertsConstructor },
   { nullptr }
--- a/widget/cocoa/nsPrintSettingsServiceX.h
+++ b/widget/cocoa/nsPrintSettingsServiceX.h
@@ -1,31 +1,31 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef nsPrintOptionsX_h_
-#define nsPrintOptionsX_h_
+#ifndef nsPrintSettingsServiceX_h
+#define nsPrintSettingsServiceX_h
 
 #include "nsPrintSettingsService.h"
 
 namespace mozilla
 {
 namespace embedding
 {
   class PrintData;
 } // namespace embedding
 } // namespace mozilla
 
-class nsPrintOptionsX : public nsPrintOptions
+class nsPrintSettingsServiceX final : public nsPrintSettingsService
 {
 public:
-             nsPrintOptionsX();
-  virtual    ~nsPrintOptionsX();
+  nsPrintSettingsServiceX() {}
+  virtual ~nsPrintSettingsServiceX() {}
 
   /*
    * These serialize and deserialize methods are not symmetrical in that
    * printSettingsX != deserialize(serialize(printSettingsX)). This is because
    * the native print settings stored in the nsPrintSettingsX's NSPrintInfo
    * object are not fully serialized. Only the values needed for successful
    * printing are.
    */
@@ -47,9 +47,9 @@ private:
                                      mozilla::embedding::PrintData* data);
 
   /* Serialization done in parent to be deserialized in the child */
   nsresult SerializeToPrintDataParent(nsIPrintSettings* aSettings,
                                       nsIWebBrowserPrint* aWBP,
                                       mozilla::embedding::PrintData* data);
 };
 
-#endif // nsPrintOptionsX_h_
+#endif // nsPrintSettingsServiceX_h
--- a/widget/cocoa/nsPrintSettingsServiceX.mm
+++ b/widget/cocoa/nsPrintSettingsServiceX.mm
@@ -9,30 +9,22 @@
 #include "nsQueryObject.h"
 #include "nsIServiceManager.h"
 #include "nsPrintSettingsX.h"
 #include "nsIWebBrowserPrint.h"
 #include "nsCocoaUtils.h"
 
 using namespace mozilla::embedding;
 
-nsPrintOptionsX::nsPrintOptionsX()
-{
-}
-
-nsPrintOptionsX::~nsPrintOptionsX()
+NS_IMETHODIMP
+nsPrintSettingsServiceX::SerializeToPrintData(nsIPrintSettings* aSettings,
+                                              nsIWebBrowserPrint* aWBP,
+                                              PrintData* data)
 {
-}
-
-NS_IMETHODIMP
-nsPrintOptionsX::SerializeToPrintData(nsIPrintSettings* aSettings,
-                                      nsIWebBrowserPrint* aWBP,
-                                      PrintData* data)
-{
-  nsresult rv = nsPrintOptions::SerializeToPrintData(aSettings, aWBP, data);
+  nsresult rv = nsPrintSettingsService::SerializeToPrintData(aSettings, aWBP, data);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
   RefPtr<nsPrintSettingsX> settingsX(do_QueryObject(aSettings));
   if (NS_WARN_IF(!settingsX)) {
     return NS_ERROR_FAILURE;
   }
@@ -45,19 +37,19 @@ nsPrintOptionsX::SerializeToPrintData(ns
   if (XRE_IsParentProcess()) {
     return SerializeToPrintDataParent(aSettings, aWBP, data);
   }
 
   return SerializeToPrintDataChild(aSettings, aWBP, data);
 }
 
 nsresult
-nsPrintOptionsX::SerializeToPrintDataChild(nsIPrintSettings* aSettings,
-                                           nsIWebBrowserPrint* aWBP,
-                                           PrintData* data)
+nsPrintSettingsServiceX::SerializeToPrintDataChild(nsIPrintSettings* aSettings,
+                                                   nsIWebBrowserPrint* aWBP,
+                                                   PrintData* data)
 {
   // If we are in the child process, we don't need to populate
   // nsPrintSettingsX completely. The parent discards almost all of
   // this data (bug 1328975). Furthermore, reading some of the
   // printer/printing settings from the OS causes a connection to the
   // printer to be made which is blocked by sandboxing and results in hangs.
   if (aWBP) {
     // When serializing an nsIWebBrowserPrint, we need to pass up the first
@@ -79,19 +71,19 @@ nsPrintOptionsX::SerializeToPrintDataChi
       docTitles = nullptr;
     }
   }
 
   return NS_OK;
 }
 
 nsresult
-nsPrintOptionsX::SerializeToPrintDataParent(nsIPrintSettings* aSettings,
-                                            nsIWebBrowserPrint* aWBP,
-                                            PrintData* data)
+nsPrintSettingsServiceX::SerializeToPrintDataParent(nsIPrintSettings* aSettings,
+                                                    nsIWebBrowserPrint* aWBP,
+                                                    PrintData* data)
 {
   RefPtr<nsPrintSettingsX> settingsX(do_QueryObject(aSettings));
   if (NS_WARN_IF(!settingsX)) {
     return NS_ERROR_FAILURE;
   }
 
   NSPrintInfo* printInfo = settingsX->GetCocoaPrintInfo();
   if (NS_WARN_IF(!printInfo)) {
@@ -174,20 +166,20 @@ nsPrintOptionsX::SerializeToPrintDataPar
   data->addHeaderAndFooter() = [[dict objectForKey: NSPrintHeaderAndFooter] boolValue];
   data->fileNameExtensionHidden() =
     [[dict objectForKey: NSPrintJobSavingFileNameExtensionHidden] boolValue];
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrintOptionsX::DeserializeToPrintSettings(const PrintData& data,
-                                            nsIPrintSettings* settings)
+nsPrintSettingsServiceX::DeserializeToPrintSettings(const PrintData& data,
+                                                    nsIPrintSettings* settings)
 {
-  nsresult rv = nsPrintOptions::DeserializeToPrintSettings(data, settings);
+  nsresult rv = nsPrintSettingsService::DeserializeToPrintSettings(data, settings);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
   if (data.orientation() == nsIPrintSettings::kPortraitOrientation) {
     settings->SetOrientation(nsIPrintSettings::kPortraitOrientation);
   } else {
     settings->SetOrientation(nsIPrintSettings::kLandscapeOrientation);
@@ -199,32 +191,34 @@ nsPrintOptionsX::DeserializeToPrintSetti
   }
   settingsX->SetAdjustedPaperSize(data.adjustedPaperWidth(),
                                   data.adjustedPaperHeight());
 
   return NS_OK;
 }
 
 nsresult
-nsPrintOptionsX::ReadPrefs(nsIPrintSettings* aPS, const nsAString& aPrinterName, uint32_t aFlags)
+nsPrintSettingsServiceX::ReadPrefs(nsIPrintSettings* aPS,
+                                   const nsAString& aPrinterName,
+                                   uint32_t aFlags)
 {
   nsresult rv;
   
-  rv = nsPrintOptions::ReadPrefs(aPS, aPrinterName, aFlags);
-  NS_ASSERTION(NS_SUCCEEDED(rv), "nsPrintOptions::ReadPrefs() failed");
+  rv = nsPrintSettingsService::ReadPrefs(aPS, aPrinterName, aFlags);
+  NS_ASSERTION(NS_SUCCEEDED(rv), "nsPrintSettingsService::ReadPrefs() failed");
   
   RefPtr<nsPrintSettingsX> printSettingsX(do_QueryObject(aPS));
   if (!printSettingsX)
     return NS_ERROR_NO_INTERFACE;
   rv = printSettingsX->ReadPageFormatFromPrefs();
   
   return NS_OK;
 }
 
-nsresult nsPrintOptionsX::_CreatePrintSettings(nsIPrintSettings **_retval)
+nsresult nsPrintSettingsServiceX::_CreatePrintSettings(nsIPrintSettings** _retval)
 {
   nsresult rv;
   *_retval = nullptr;
 
   nsPrintSettingsX* printSettings = new nsPrintSettingsX; // does not initially ref count
   NS_ENSURE_TRUE(printSettings, NS_ERROR_OUT_OF_MEMORY);
   NS_ADDREF(*_retval = printSettings);
 
@@ -234,22 +228,24 @@ nsresult nsPrintOptionsX::_CreatePrintSe
     return rv;
   }
 
   InitPrintSettingsFromPrefs(*_retval, false, nsIPrintSettings::kInitSaveAll);
   return rv;
 }
 
 nsresult
-nsPrintOptionsX::WritePrefs(nsIPrintSettings* aPS, const nsAString& aPrinterName, uint32_t aFlags)
+nsPrintSettingsServiceX::WritePrefs(nsIPrintSettings* aPS,
+                                    const nsAString& aPrinterName,
+                                    uint32_t aFlags)
 {
   nsresult rv;
 
-  rv = nsPrintOptions::WritePrefs(aPS, aPrinterName, aFlags);
-  NS_ASSERTION(NS_SUCCEEDED(rv), "nsPrintOptions::WritePrefs() failed");
+  rv = nsPrintSettingsService::WritePrefs(aPS, aPrinterName, aFlags);
+  NS_ASSERTION(NS_SUCCEEDED(rv), "nsPrintSettingsService::WritePrefs() failed");
 
   RefPtr<nsPrintSettingsX> printSettingsX(do_QueryObject(aPS));
   if (!printSettingsX)
     return NS_ERROR_NO_INTERFACE;
   rv = printSettingsX->WritePageFormatToPrefs();
   NS_ASSERTION(NS_SUCCEEDED(rv), "nsPrintSettingsX::WritePageFormatToPrefs() failed");
 
   return NS_OK;
--- a/widget/cocoa/nsWidgetFactory.mm
+++ b/widget/cocoa/nsWidgetFactory.mm
@@ -70,17 +70,17 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsChildVi
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsColorPicker)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecX)
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintOptionsX, Init)
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSettingsServiceX, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintDialogServiceX, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSession, Init)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIdleServiceX, nsIdleServiceX::GetInstance)
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(ScreenManager, ScreenManager::GetAddRefedSingleton)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(OSXNotificationCenter, Init)
 
 #include "nsMenuBarX.h"
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsNativeMenuServiceX)
@@ -159,17 +159,17 @@ static const mozilla::Module::CIDEntry k
     mozilla::Module::MAIN_PROCESS_ONLY },
   { &kNS_BIDIKEYBOARD_CID, false, NULL, nsBidiKeyboardConstructor,
     mozilla::Module::MAIN_PROCESS_ONLY },
   { &kNS_THEMERENDERER_CID, false, NULL, nsNativeThemeCocoaConstructor },
   { &kNS_SCREENMANAGER_CID, false, NULL, ScreenManagerConstructor,
     mozilla::Module::MAIN_PROCESS_ONLY },
   { &kNS_DEVICE_CONTEXT_SPEC_CID, false, NULL, nsDeviceContextSpecXConstructor },
   { &kNS_PRINTSESSION_CID, false, NULL, nsPrintSessionConstructor },
-  { &kNS_PRINTSETTINGSSERVICE_CID, false, NULL, nsPrintOptionsXConstructor },
+  { &kNS_PRINTSETTINGSSERVICE_CID, false, NULL, nsPrintSettingsServiceXConstructor },
   { &kNS_PRINTDIALOGSERVICE_CID, false, NULL, nsPrintDialogServiceXConstructor },
   { &kNS_IDLE_SERVICE_CID, false, NULL, nsIdleServiceXConstructor },
   { &kNS_SYSTEMALERTSSERVICE_CID, false, NULL, OSXNotificationCenterConstructor },
   { &kNS_NATIVEMENUSERVICE_CID, false, NULL, nsNativeMenuServiceXConstructor },
   { &kNS_MACDOCKSUPPORT_CID, false, NULL, nsMacDockSupportConstructor },
   { &kNS_MACWEBAPPUTILS_CID, false, NULL, nsMacWebAppUtilsConstructor },
   { &kNS_STANDALONENATIVEMENU_CID, false, NULL, nsStandaloneNativeMenuConstructor },
   { &kNS_MACSYSTEMSTATUSBAR_CID, false, NULL, nsSystemStatusBarCocoaConstructor },
--- a/widget/gtk/nsPrintSettingsServiceGTK.cpp
+++ b/widget/gtk/nsPrintSettingsServiceGTK.cpp
@@ -3,51 +3,34 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsPrintSettingsServiceGTK.h"
 #include "nsPrintSettingsGTK.h"
 
 using namespace mozilla::embedding;
 
-/** ---------------------------------------------------
- *  See documentation in nsPrintOptionsWin.h
- *	@update 6/21/00 dwc
- */
-nsPrintOptionsGTK::nsPrintOptionsGTK()
-{
-
-}
-
-/** ---------------------------------------------------
- *  See documentation in nsPrintOptionsImpl.h
- *	@update 6/21/00 dwc
- */
-nsPrintOptionsGTK::~nsPrintOptionsGTK()
-{
-}
-
 static void
 serialize_gtk_printsettings_to_printdata(const gchar *key,
                                          const gchar *value,
                                          gpointer aData)
 {
   PrintData* data = (PrintData*)aData;
   CStringKeyValue pair;
   pair.key() = key;
   pair.value() = value;
   data->GTKPrintSettings().AppendElement(pair);
 }
 
 NS_IMETHODIMP
-nsPrintOptionsGTK::SerializeToPrintData(nsIPrintSettings* aSettings,
-                                        nsIWebBrowserPrint* aWBP,
-                                        PrintData* data)
+nsPrintSettingsServiceGTK::SerializeToPrintData(nsIPrintSettings* aSettings,
+                                                nsIWebBrowserPrint* aWBP,
+                                                PrintData* data)
 {
-  nsresult rv = nsPrintOptions::SerializeToPrintData(aSettings, aWBP, data);
+  nsresult rv = nsPrintSettingsService::SerializeToPrintData(aSettings, aWBP, data);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsPrintSettingsGTK> settingsGTK(do_QueryInterface(aSettings));
   NS_ENSURE_STATE(settingsGTK);
 
   GtkPrintSettings* gtkPrintSettings = settingsGTK->GetGtkPrintSettings();
   NS_ENSURE_STATE(gtkPrintSettings);
 
@@ -55,23 +38,23 @@ nsPrintOptionsGTK::SerializeToPrintData(
     gtkPrintSettings,
     serialize_gtk_printsettings_to_printdata,
     data);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrintOptionsGTK::DeserializeToPrintSettings(const PrintData& data,
-                                              nsIPrintSettings* settings)
+nsPrintSettingsServiceGTK::DeserializeToPrintSettings(const PrintData& data,
+                                                      nsIPrintSettings* settings)
 {
   nsCOMPtr<nsPrintSettingsGTK> settingsGTK(do_QueryInterface(settings));
   NS_ENSURE_STATE(settingsGTK);
 
-  nsresult rv = nsPrintOptions::DeserializeToPrintSettings(data, settings);
+  nsresult rv = nsPrintSettingsService::DeserializeToPrintSettings(data, settings);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Instead of re-using the GtkPrintSettings that nsIPrintSettings is
   // wrapping, we'll create a new one to deserialize to and replace it
   // within nsIPrintSettings.
   GtkPrintSettings* newGtkPrintSettings = gtk_print_settings_new();
 
   for (uint32_t i = 0; i < data.GTKPrintSettings().Length(); ++i) {
@@ -84,17 +67,17 @@ nsPrintOptionsGTK::DeserializeToPrintSet
   settingsGTK->SetGtkPrintSettings(newGtkPrintSettings);
 
   // nsPrintSettingsGTK is holding a reference to newGtkPrintSettings
   g_object_unref(newGtkPrintSettings);
   newGtkPrintSettings = nullptr;
   return NS_OK;
 }
 
-nsresult nsPrintOptionsGTK::_CreatePrintSettings(nsIPrintSettings **_retval)
+nsresult nsPrintSettingsServiceGTK::_CreatePrintSettings(nsIPrintSettings** _retval)
 {
   *_retval = nullptr;
   nsPrintSettingsGTK* printSettings = new nsPrintSettingsGTK(); // does not initially ref count
   NS_ENSURE_TRUE(printSettings, NS_ERROR_OUT_OF_MEMORY);
 
   NS_ADDREF(*_retval = printSettings); // ref count
 
   return NS_OK;
--- a/widget/gtk/nsPrintSettingsServiceGTK.h
+++ b/widget/gtk/nsPrintSettingsServiceGTK.h
@@ -1,40 +1,37 @@
 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef nsPrintOptionsGTK_h__
-#define nsPrintOptionsGTK_h__
+#ifndef nsPrintSettingsServiceGTK_h
+#define nsPrintSettingsServiceGTK_h
 
 #include "nsPrintSettingsService.h"
 
 namespace mozilla
 {
 namespace embedding
 {
   class PrintData;
 } // namespace embedding
 } // namespace mozilla
 
-//*****************************************************************************
-//***    nsPrintOptions
-//*****************************************************************************
-class nsPrintOptionsGTK : public nsPrintOptions
+class nsPrintSettingsServiceGTK final : public nsPrintSettingsService
 {
 public:
-  nsPrintOptionsGTK();
-  virtual ~nsPrintOptionsGTK();
+  nsPrintSettingsServiceGTK() {}
+  virtual ~nsPrintSettingsServiceGTK() {}
 
   NS_IMETHODIMP SerializeToPrintData(nsIPrintSettings* aSettings,
                                      nsIWebBrowserPrint* aWBP,
                                      mozilla::embedding::PrintData* data);
   NS_IMETHODIMP DeserializeToPrintSettings(const mozilla::embedding::PrintData& data,
                                            nsIPrintSettings* settings);
 
   virtual nsresult _CreatePrintSettings(nsIPrintSettings **_retval);
 };
 
 
 
-#endif /* nsPrintOptions_h__ */
+#endif // nsPrintSettingsServiceGTK_h
--- a/widget/gtk/nsWidgetFactory.cpp
+++ b/widget/gtk/nsWidgetFactory.cpp
@@ -111,17 +111,17 @@ namespace widget {
 // This constructor should really be shared with all platforms.
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxInfo, Init)
 }
 }
 #endif
 
 #ifdef NS_PRINTING
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecGTK)
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintOptionsGTK, Init)
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSettingsServiceGTK, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrinterEnumeratorGTK)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSession, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintDialogServiceGTK, Init)
 #endif
 
 static nsresult
 nsFilePickerConstructor(nsISupports *aOuter, REFNSIID aIID,
                         void **aResult)
@@ -245,17 +245,17 @@ static const mozilla::Module::CIDEntry k
     { &kNS_DRAGSERVICE_CID, false, nullptr, nsDragServiceConstructor, Module::MAIN_PROCESS_ONLY },
 #endif
     { &kNS_HTMLFORMATCONVERTER_CID, false, nullptr, nsHTMLFormatConverterConstructor },
     { &kNS_BIDIKEYBOARD_CID, false, nullptr, nsBidiKeyboardConstructor },
     { &kNS_SCREENMANAGER_CID, false, nullptr, ScreenManagerConstructor,
       Module::MAIN_PROCESS_ONLY },
     { &kNS_THEMERENDERER_CID, false, nullptr, nsNativeThemeGTKConstructor },
 #ifdef NS_PRINTING
-    { &kNS_PRINTSETTINGSSERVICE_CID, false, nullptr, nsPrintOptionsGTKConstructor },
+    { &kNS_PRINTSETTINGSSERVICE_CID, false, nullptr, nsPrintSettingsServiceGTKConstructor },
     { &kNS_PRINTER_ENUMERATOR_CID, false, nullptr, nsPrinterEnumeratorGTKConstructor },
     { &kNS_PRINTSESSION_CID, false, nullptr, nsPrintSessionConstructor },
     { &kNS_DEVICE_CONTEXT_SPEC_CID, false, nullptr, nsDeviceContextSpecGTKConstructor },
     { &kNS_PRINTDIALOGSERVICE_CID, false, nullptr, nsPrintDialogServiceGTKConstructor },
 #endif
     { &kNS_IMAGE_TO_PIXBUF_CID, false, nullptr, nsImageToPixbufConstructor },
 #if defined(MOZ_X11)
     { &kNS_IDLE_SERVICE_CID, false, nullptr, nsIdleServiceGTKConstructor },
--- a/widget/nsPrintSettingsImpl.cpp
+++ b/widget/nsPrintSettingsImpl.cpp
@@ -764,17 +764,17 @@ NS_IMETHODIMP nsPrintSettings::GetPaperD
 }
 NS_IMETHODIMP nsPrintSettings::SetPaperData(int16_t aPaperData)
 {
   mPaperData = aPaperData;
   return NS_OK;
 }
 
 /** ---------------------------------------------------
- *  See documentation in nsPrintOptionsImpl.h
+ *  See documentation in nsPrintSettingsService.h
  *	@update 6/21/00 dwc
  *	@update 1/12/01 rods
  */
 NS_IMETHODIMP 
 nsPrintSettings::SetMarginInTwips(nsIntMargin& aMargin)
 {
   mMargin = aMargin;
   return NS_OK;
@@ -804,17 +804,17 @@ nsPrintSettings::SetUnwriteableMarginInT
   }
   if (aUnwriteableMargin.right >= 0) {
     mUnwriteableMargin.right = aUnwriteableMargin.right;
   }
   return NS_OK;
 }
 
 /** ---------------------------------------------------
- *  See documentation in nsPrintOptionsImpl.h
+ *  See documentation in nsPrintSettingsService.h
  *	@update 6/21/00 dwc
  */
 NS_IMETHODIMP 
 nsPrintSettings::GetMarginInTwips(nsIntMargin& aMargin)
 {
   aMargin = mMargin;
   return NS_OK;
 }
@@ -838,17 +838,17 @@ nsPrintSettings::GetUnwriteableMarginInT
  */
 NS_IMETHODIMP
 nsPrintSettings::SetupSilentPrinting()
 {
   return NS_OK;
 }
 
 /** ---------------------------------------------------
- *  See documentation in nsPrintOptionsImpl.h
+ *  See documentation in nsPrintSettingsService.h
  */
 NS_IMETHODIMP 
 nsPrintSettings::GetEffectivePageSize(double *aWidth, double *aHeight)
 {
   if (mPaperSizeUnit == kPaperSizeInches) {
     *aWidth  = NS_INCHES_TO_TWIPS(float(mPaperWidth));
     *aHeight = NS_INCHES_TO_TWIPS(float(mPaperHeight));
   } else {
--- a/widget/nsPrintSettingsService.cpp
+++ b/widget/nsPrintSettingsService.cpp
@@ -29,17 +29,17 @@
 #include "nsPrintfCString.h"
 #include "nsIWebBrowserPrint.h"
 
 using namespace mozilla;
 using namespace mozilla::embedding;
 
 typedef mozilla::layout::RemotePrintJobChild RemotePrintJobChild;
 
-NS_IMPL_ISUPPORTS(nsPrintOptions, nsIPrintSettingsService)
+NS_IMPL_ISUPPORTS(nsPrintSettingsService, nsIPrintSettingsService)
 
 // Pref Constants
 static const char kMarginTop[]       = "print_margin_top";
 static const char kMarginLeft[]      = "print_margin_left";
 static const char kMarginBottom[]    = "print_margin_bottom";
 static const char kMarginRight[]     = "print_margin_right";
 static const char kEdgeTop[]         = "print_edge_top";
 static const char kEdgeLeft[]        = "print_edge_left";
@@ -81,34 +81,26 @@ static const char kPrintResolution[]    
 static const char kPrintDuplex[]        = "print_duplex";
 
 static const char kJustLeft[]   = "left";
 static const char kJustCenter[] = "center";
 static const char kJustRight[]  = "right";
 
 #define NS_PRINTER_ENUMERATOR_CONTRACTID "@mozilla.org/gfx/printerenumerator;1"
 
-nsPrintOptions::nsPrintOptions()
-{
-}
-
-nsPrintOptions::~nsPrintOptions()
-{
-}
-
 nsresult
-nsPrintOptions::Init()
+nsPrintSettingsService::Init()
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrintOptions::SerializeToPrintData(nsIPrintSettings* aSettings,
-                                     nsIWebBrowserPrint* aWBP,
-                                     PrintData* data)
+nsPrintSettingsService::SerializeToPrintData(nsIPrintSettings* aSettings,
+                                             nsIWebBrowserPrint* aWBP,
+                                             PrintData* data)
 {
   nsCOMPtr<nsIPrintSession> session;
   nsresult rv = aSettings->GetPrintSession(getter_AddRefs(session));
   if (NS_SUCCEEDED(rv) && session) {
     RefPtr<RemotePrintJobChild> remotePrintJob;
     rv = session->GetRemotePrintJob(getter_AddRefs(remotePrintJob));
     if (NS_SUCCEEDED(rv)) {
       data->remotePrintJobChild() = remotePrintJob;
@@ -208,18 +200,18 @@ nsPrintOptions::SerializeToPrintData(nsI
   // data->faxNumber() default-initializes
   data->addHeaderAndFooter() = false;
   data->fileNameExtensionHidden() = false;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrintOptions::DeserializeToPrintSettings(const PrintData& data,
-                                           nsIPrintSettings* settings)
+nsPrintSettingsService::DeserializeToPrintSettings(const PrintData& data,
+                                                   nsIPrintSettings* settings)
 {
   nsCOMPtr<nsIPrintSession> session;
   nsresult rv = settings->GetPrintSession(getter_AddRefs(session));
   if (NS_SUCCEEDED(rv) && session) {
     session->SetRemotePrintJob(
       static_cast<RemotePrintJobChild*>(data.remotePrintJobChild()));
   }
   settings->SetStartPageRange(data.startPageRange());
@@ -299,18 +291,18 @@ nsPrintOptions::DeserializeToPrintSettin
 
 
 /** ---------------------------------------------------
  *  Helper function - Creates the "prefix" for the pref
  *  It is either "print."
  *  or "print.printer_<print name>."
  */
 const char*
-nsPrintOptions::GetPrefName(const char * aPrefName,
-                            const nsAString& aPrinterName)
+nsPrintSettingsService::GetPrefName(const char* aPrefName,
+                                    const nsAString& aPrinterName)
 {
   if (!aPrefName || !*aPrefName) {
     NS_ERROR("Must have a valid pref name!");
     return aPrefName;
   }
 
   mPrefName.AssignLiteral("print.");
 
@@ -357,18 +349,19 @@ GetPrefName((_a2), aPrefName), (_a3));
 //----------------------------------------------------------------------
 
 /**
  *  This will either read in the generic prefs (not specific to a printer)
  *  or read the prefs in using the printer name to qualify.
  *  It is either "print.attr_name" or "print.printer_HPLasr5.attr_name"
  */
 nsresult
-nsPrintOptions::ReadPrefs(nsIPrintSettings* aPS, const nsAString& aPrinterName,
-                          uint32_t aFlags)
+nsPrintSettingsService::ReadPrefs(nsIPrintSettings* aPS,
+                                  const nsAString& aPrinterName,
+                                  uint32_t aFlags)
 {
   NS_ENSURE_ARG_POINTER(aPS);
 
   if (aFlags & nsIPrintSettings::kInitSaveMargins) {
     int32_t halfInch = NS_INCHES_TO_INT_TWIPS(0.5);
     nsIntMargin margin(halfInch, halfInch, halfInch, halfInch);
     ReadInchesToTwipsPref(GetPrefName(kMarginTop, aPrinterName), margin.top,
                           kMarginTop);
@@ -669,22 +662,23 @@ nsPrintOptions::ReadPrefs(nsIPrintSettin
 
   // Not Reading In:
   //   Number of Copies
 
   return NS_OK;
 }
 
 /** ---------------------------------------------------
- *  See documentation in nsPrintOptionsImpl.h
+ *  See documentation in nsPrintSettingsService.h
  *  @update 1/12/01 rods
  */
 nsresult
-nsPrintOptions::WritePrefs(nsIPrintSettings *aPS, const nsAString& aPrinterName,
-                           uint32_t aFlags)
+nsPrintSettingsService::WritePrefs(nsIPrintSettings* aPS,
+                                   const nsAString& aPrinterName,
+                                   uint32_t aFlags)
 {
   NS_ENSURE_ARG_POINTER(aPS);
 
   nsIntMargin margin;
   if (aFlags & nsIPrintSettings::kInitSaveMargins) {
     if (NS_SUCCEEDED(aPS->GetMarginInTwips(margin))) {
       WriteInchesFromTwipsPref(GetPrefName(kMarginTop, aPrinterName),
                                margin.top);
@@ -947,17 +941,17 @@ nsPrintOptions::WritePrefs(nsIPrintSetti
   }
 
   // Not Writing Out:
   //   Number of Copies
 
   return NS_OK;
 }
 
-nsresult nsPrintOptions::_CreatePrintSettings(nsIPrintSettings **_retval)
+nsresult nsPrintSettingsService::_CreatePrintSettings(nsIPrintSettings** _retval)
 {
   // does not initially ref count
   nsPrintSettings * printSettings = new nsPrintSettings();
   NS_ENSURE_TRUE(printSettings, NS_ERROR_OUT_OF_MEMORY);
 
   NS_ADDREF(*_retval = printSettings); // ref count
 
   nsString printerName;
@@ -967,36 +961,36 @@ nsresult nsPrintOptions::_CreatePrintSet
 
   (void)InitPrintSettingsFromPrefs(*_retval, false,
                                    nsIPrintSettings::kInitSaveAll);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrintOptions::GetGlobalPrintSettings(nsIPrintSettings **aGlobalPrintSettings)
+nsPrintSettingsService::GetGlobalPrintSettings(nsIPrintSettings** aGlobalPrintSettings)
 {
   nsresult rv;
 
   rv = _CreatePrintSettings(getter_AddRefs(mGlobalPrintSettings));
   NS_ENSURE_SUCCESS(rv, rv);
 
   NS_ADDREF(*aGlobalPrintSettings = mGlobalPrintSettings.get());
 
   return rv;
 }
 
 NS_IMETHODIMP
-nsPrintOptions::GetNewPrintSettings(nsIPrintSettings * *aNewPrintSettings)
+nsPrintSettingsService::GetNewPrintSettings(nsIPrintSettings** aNewPrintSettings)
 {
   return _CreatePrintSettings(aNewPrintSettings);
 }
 
 NS_IMETHODIMP
-nsPrintOptions::GetDefaultPrinterName(nsAString& aDefaultPrinterName)
+nsPrintSettingsService::GetDefaultPrinterName(nsAString& aDefaultPrinterName)
 {
   nsresult rv;
   nsCOMPtr<nsIPrinterEnumerator> prtEnum =
            do_GetService(NS_PRINTER_ENUMERATOR_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Look up the printer from the last print job
   nsAutoString lastPrinterName;
@@ -1023,18 +1017,18 @@ nsPrintOptions::GetDefaultPrinterName(ns
   }
 
   // There is no last printer preference, or it doesn't name a valid printer.
   // Return the default from the printer enumeration.
   return prtEnum->GetDefaultPrinterName(aDefaultPrinterName);
 }
 
 NS_IMETHODIMP
-nsPrintOptions::InitPrintSettingsFromPrinter(const nsAString& aPrinterName,
-                                             nsIPrintSettings *aPrintSettings)
+nsPrintSettingsService::InitPrintSettingsFromPrinter(const nsAString& aPrinterName,
+                                                     nsIPrintSettings* aPrintSettings)
 {
   // Don't get print settings from the printer in the child when printing via
   // parent, these will be retrieved in the parent later in the print process.
   if (XRE_IsContentProcess() && Preferences::GetBool("print.print_via_parent")) {
     return NS_OK;
   }
 
   NS_ENSURE_ARG_POINTER(aPrintSettings);
@@ -1098,18 +1092,19 @@ GetAdjustedPrinterName(nsIPrintSettings*
       i++;
     }
   }
   return NS_OK;
 }
 #endif
 
 NS_IMETHODIMP
-nsPrintOptions::InitPrintSettingsFromPrefs(nsIPrintSettings* aPS,
-                                           bool aUsePNP, uint32_t aFlags)
+nsPrintSettingsService::InitPrintSettingsFromPrefs(nsIPrintSettings* aPS,
+                                                   bool aUsePNP,
+                                                   uint32_t aFlags)
 {
   NS_ENSURE_ARG_POINTER(aPS);
 
   bool isInitialized;
   aPS->GetIsInitializedFromPrefs(&isInitialized);
 
   if (isInitialized)
     return NS_OK;
@@ -1142,19 +1137,19 @@ nsPrintOptions::InitPrintSettingsFromPre
   return NS_OK;
 }
 
 /**
  *  Save all of the printer settings; if we can find a printer name, save
  *  printer-specific preferences. Otherwise, save generic ones.
  */
 nsresult
-nsPrintOptions::SavePrintSettingsToPrefs(nsIPrintSettings *aPS,
-                                         bool aUsePrinterNamePrefix,
-                                         uint32_t aFlags)
+nsPrintSettingsService::SavePrintSettingsToPrefs(nsIPrintSettings* aPS,
+                                                 bool aUsePrinterNamePrefix,
+                                                 uint32_t aFlags)
 {
   NS_ENSURE_ARG_POINTER(aPS);
 
   if (GeckoProcessType_Content == XRE_GetProcessType()) {
     // If we're in the content process, we can't directly write to the
     // Preferences service - we have to proxy the save up to the
     // parent process.
     RefPtr<nsPrintingProxy> proxy = nsPrintingProxy::GetInstance();
@@ -1175,42 +1170,43 @@ nsPrintOptions::SavePrintSettingsToPrefs
   return WritePrefs(aPS, prtName, aFlags);
 }
 
 
 //-----------------------------------------------------
 //-- Protected Methods --------------------------------
 //-----------------------------------------------------
 nsresult
-nsPrintOptions::ReadPrefDouble(const char * aPrefId, double& aVal)
+nsPrintSettingsService::ReadPrefDouble(const char* aPrefId, double& aVal)
 {
   NS_ENSURE_ARG_POINTER(aPrefId);
 
   nsAutoCString str;
   nsresult rv = Preferences::GetCString(aPrefId, str);
   if (NS_SUCCEEDED(rv) && !str.IsEmpty()) {
     aVal = atof(str.get());
   }
   return rv;
 }
 
 nsresult
-nsPrintOptions::WritePrefDouble(const char * aPrefId, double aVal)
+nsPrintSettingsService::WritePrefDouble(const char* aPrefId, double aVal)
 {
   NS_ENSURE_ARG_POINTER(aPrefId);
 
   nsPrintfCString str("%6.2f", aVal);
   NS_ENSURE_TRUE(!str.IsEmpty(), NS_ERROR_FAILURE);
 
   return Preferences::SetCString(aPrefId, str);
 }
 
 void
-nsPrintOptions::ReadInchesToTwipsPref(const char * aPrefId, int32_t& aTwips,
-                                      const char * aMarginPref)
+nsPrintSettingsService::ReadInchesToTwipsPref(const char* aPrefId,
+                                              int32_t& aTwips,
+                                              const char* aMarginPref)
 {
   nsAutoString str;
   nsresult rv = Preferences::GetString(aPrefId, str);
   if (NS_FAILED(rv) || str.IsEmpty()) {
     rv = Preferences::GetString(aMarginPref, str);
   }
   if (NS_SUCCEEDED(rv) && !str.IsEmpty()) {
     nsresult errCode;
@@ -1219,68 +1215,73 @@ nsPrintOptions::ReadInchesToTwipsPref(co
       aTwips = NS_INCHES_TO_INT_TWIPS(inches);
     } else {
       aTwips = 0;
     }
   }
 }
 
 void
-nsPrintOptions::WriteInchesFromTwipsPref(const char * aPrefId, int32_t aTwips)
+nsPrintSettingsService::WriteInchesFromTwipsPref(const char* aPrefId,
+                                                 int32_t aTwips)
 {
   double inches = NS_TWIPS_TO_INCHES(aTwips);
   nsAutoCString inchesStr;
   inchesStr.AppendFloat(inches);
 
   Preferences::SetCString(aPrefId, inchesStr);
 }
 
 void
-nsPrintOptions::ReadInchesIntToTwipsPref(const char * aPrefId, int32_t& aTwips,
-                                         const char * aMarginPref)
+nsPrintSettingsService::ReadInchesIntToTwipsPref(const char* aPrefId,
+                                                 int32_t& aTwips,
+                                                 const char* aMarginPref)
 {
   int32_t value;
   nsresult rv = Preferences::GetInt(aPrefId, &value);
   if (NS_FAILED(rv)) {
     rv = Preferences::GetInt(aMarginPref, &value);
   }
   if (NS_SUCCEEDED(rv)) {
     aTwips = NS_INCHES_TO_INT_TWIPS(float(value)/100.0f);
   } else {
     aTwips = 0;
   }
 }
 
 void
-nsPrintOptions::WriteInchesIntFromTwipsPref(const char * aPrefId, int32_t aTwips)
+nsPrintSettingsService::WriteInchesIntFromTwipsPref(const char* aPrefId,
+                                                    int32_t aTwips)
 {
   Preferences::SetInt(aPrefId,
                       int32_t(NS_TWIPS_TO_INCHES(aTwips) * 100.0f + 0.5f));
 }
 
 void
-nsPrintOptions::ReadJustification(const char * aPrefId, int16_t& aJust,
-                                  int16_t aInitValue)
+nsPrintSettingsService::ReadJustification(const char* aPrefId,
+                                          int16_t& aJust,
+                                          int16_t aInitValue)
 {
   aJust = aInitValue;
   nsAutoString justStr;
   if (NS_SUCCEEDED(Preferences::GetString(aPrefId, justStr))) {
     if (justStr.EqualsASCII(kJustRight)) {
       aJust = nsIPrintSettings::kJustRight;
     } else if (justStr.EqualsASCII(kJustCenter)) {
       aJust = nsIPrintSettings::kJustCenter;
     } else {
       aJust = nsIPrintSettings::kJustLeft;
     }
   }
 }
 
 //---------------------------------------------------
 void
-nsPrintOptions::WriteJustification(const char * aPrefId, int16_t aJust)
+nsPrintSettingsService::WriteJustification(const char* aPrefId,
+                                           int16_t aJust)
 {
   switch (aJust) {
     case nsIPrintSettings::kJustLeft:
       Preferences::SetCString(aPrefId, kJustLeft);
       break;
 
     case nsIPrintSettings::kJustCenter:
       Preferences::SetCString(aPrefId, kJustCenter);
@@ -1300,17 +1301,17 @@ nsPrintOptions::WriteJustification(const
 class Tester {
   public:
     Tester();
 };
 Tester::Tester()
 {
   nsCOMPtr<nsIPrintSettings> ps;
   nsresult rv;
-  nsCOMPtr<nsIPrintOptions> printService =
+  nsCOMPtr<nsIPrintSettingsService> printService =
       do_GetService("@mozilla.org/gfx/printsettings-service;1", &rv);
   if (NS_SUCCEEDED(rv)) {
     rv = printService->CreatePrintSettings(getter_AddRefs(ps));
   }
 
   if (ps) {
     ps->SetPrintOptions(nsIPrintSettings::kPrintOddPages,  true);
     ps->SetPrintOptions(nsIPrintSettings::kPrintEvenPages,  false);
--- a/widget/nsPrintSettingsService.h
+++ b/widget/nsPrintSettingsService.h
@@ -1,46 +1,47 @@
 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef nsPrintOptionsImpl_h__
-#define nsPrintOptionsImpl_h__
+#ifndef nsPrintSettingsService_h
+#define nsPrintSettingsService_h
 
 #include "mozilla/embedding/PPrinting.h"
 #include "nsCOMPtr.h"
 #include "nsIPrintSettingsService.h"
 #include "nsString.h"
 #include "nsFont.h"
 
 class nsIPrintSettings;
 
 /**
- *   Class nsPrintOptions
+ * Class nsPrintSettingsService.  Base class for the platform specific widget
+ * subclasses to inherit from.
  */
-class nsPrintOptions : public nsIPrintSettingsService
+class nsPrintSettingsService : public nsIPrintSettingsService
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPRINTSETTINGSSERVICE
 
+  nsPrintSettingsService() {}
+
   /**
    * method Init
    *  Initializes member variables. Every consumer that does manual
    *  creation (instead of do_CreateInstance) needs to call this method
    *  immediately after instantiation.
    */
   virtual nsresult Init();
 
-  nsPrintOptions();
-
 protected:
-  virtual ~nsPrintOptions();
+  virtual ~nsPrintSettingsService() {}
 
   void ReadBitFieldPref(const char * aPrefId, int32_t anOption);
   void WriteBitFieldPref(const char * aPrefId, int32_t anOption);
   void ReadJustification(const char * aPrefId, int16_t& aJust,
                          int16_t aInitValue);
   void WriteJustification(const char * aPrefId, int16_t aJust);
   void ReadInchesToTwipsPref(const char * aPrefId, int32_t&  aTwips,
                              const char * aMarginPref);
@@ -81,13 +82,13 @@ protected:
 
   // Members
   nsCOMPtr<nsIPrintSettings> mGlobalPrintSettings;
 
   nsCString mPrefName;
 
 private:
   // These are not supported and are not implemented!
-  nsPrintOptions(const nsPrintOptions& x);
-  nsPrintOptions& operator=(const nsPrintOptions& x);
+  nsPrintSettingsService(const nsPrintSettingsService& x) = delete;
+  nsPrintSettingsService& operator=(const nsPrintSettingsService& x) = delete;
 };
 
-#endif /* nsPrintOptionsImpl_h__ */
+#endif // nsPrintSettingsService_h
--- a/widget/windows/nsPrintSettingsServiceWin.cpp
+++ b/widget/windows/nsPrintSettingsServiceWin.cpp
@@ -14,39 +14,22 @@
 #include "nsIWebBrowserPrint.h"
 #include "nsWindowsHelpers.h"
 #include "ipc/IPCMessageUtils.h"
 
 const char kPrinterEnumeratorContractID[] = "@mozilla.org/gfx/printerenumerator;1";
 
 using namespace mozilla::embedding;
 
-/** ---------------------------------------------------
- *  See documentation in nsPrintOptionsWin.h
- *	@update 6/21/00 dwc
- */
-nsPrintOptionsWin::nsPrintOptionsWin()
+NS_IMETHODIMP
+nsPrintSettingsServiceWin::SerializeToPrintData(nsIPrintSettings* aSettings,
+                                                nsIWebBrowserPrint* aWBP,
+                                                PrintData* data)
 {
-
-}
-
-/** ---------------------------------------------------
- *  See documentation in nsPrintOptionsImpl.h
- *	@update 6/21/00 dwc
- */
-nsPrintOptionsWin::~nsPrintOptionsWin()
-{
-}
-
-NS_IMETHODIMP
-nsPrintOptionsWin::SerializeToPrintData(nsIPrintSettings* aSettings,
-                                        nsIWebBrowserPrint* aWBP,
-                                        PrintData* data)
-{
-  nsresult rv = nsPrintOptions::SerializeToPrintData(aSettings, aWBP, data);
+  nsresult rv = nsPrintSettingsService::SerializeToPrintData(aSettings, aWBP, data);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Windows wants this information for its print dialogs
   if (aWBP) {
     aWBP->GetIsFramesetDocument(&data->isFramesetDocument());
     aWBP->GetIsFramesetFrameSelected(&data->isFramesetFrameSelected());
     aWBP->GetIsIFrameSelected(&data->isIFrameSelected());
     aWBP->GetIsRangeSelection(&data->isRangeSelection());
@@ -99,20 +82,20 @@ nsPrintOptionsWin::SerializeToPrintData(
       data->devModeData().SwapElements(arrayBuf);
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsPrintOptionsWin::DeserializeToPrintSettings(const PrintData& data,
-                                              nsIPrintSettings* settings)
+nsPrintSettingsServiceWin::DeserializeToPrintSettings(const PrintData& data,
+                                                      nsIPrintSettings* settings)
 {
-  nsresult rv = nsPrintOptions::DeserializeToPrintSettings(data, settings);
+  nsresult rv = nsPrintSettingsService::DeserializeToPrintSettings(data, settings);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIPrintSettingsWin> psWin = do_QueryInterface(settings);
   if (!settings) {
     return NS_ERROR_FAILURE;
   }
 
   if (XRE_IsContentProcess()) {
@@ -143,17 +126,17 @@ nsPrintOptionsWin::DeserializeToPrintSet
 
       psWin->SetDevMode(devMode); // Copies
     }
   }
 
   return NS_OK;
 }
 
-nsresult nsPrintOptionsWin::_CreatePrintSettings(nsIPrintSettings **_retval)
+nsresult nsPrintSettingsServiceWin::_CreatePrintSettings(nsIPrintSettings** _retval)
 {
   *_retval = nullptr;
   nsPrintSettingsWin* printSettings = new nsPrintSettingsWin(); // does not initially ref count
   NS_ENSURE_TRUE(printSettings, NS_ERROR_OUT_OF_MEMORY);
 
   NS_ADDREF(*_retval = printSettings); // ref count
 
   return NS_OK;
--- a/widget/windows/nsPrintSettingsServiceWin.h
+++ b/widget/windows/nsPrintSettingsServiceWin.h
@@ -1,36 +1,33 @@
 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef nsPrintOptionsWin_h__
-#define nsPrintOptionsWin_h__
+#ifndef nsPrintSettingsServiceWin_h
+#define nsPrintSettingsServiceWin_h
 
 #include "mozilla/embedding/PPrinting.h"
 #include "nsPrintSettingsService.h"
 
 class nsIPrintSettings;
 class nsIWebBrowserPrint;
 
-//*****************************************************************************
-//***    nsPrintOptions
-//*****************************************************************************
-class nsPrintOptionsWin : public nsPrintOptions
+class nsPrintSettingsServiceWin final : public nsPrintSettingsService
 {
 public:
-  nsPrintOptionsWin();
-  virtual ~nsPrintOptionsWin();
+  nsPrintSettingsServiceWin() {}
+  virtual ~nsPrintSettingsServiceWin() {}
 
   NS_IMETHODIMP SerializeToPrintData(nsIPrintSettings* aSettings,
                                      nsIWebBrowserPrint* aWBP,
                                      mozilla::embedding::PrintData* data);
   NS_IMETHODIMP DeserializeToPrintSettings(const mozilla::embedding::PrintData& data,
                                            nsIPrintSettings* settings);
 
   virtual nsresult _CreatePrintSettings(nsIPrintSettings **_retval);
 };
 
 
 
-#endif /* nsPrintOptions_h__ */
+#endif // nsPrintSettingsServiceWin_h
--- a/widget/windows/nsPrintSettingsWin.cpp
+++ b/widget/windows/nsPrintSettingsWin.cpp
@@ -439,27 +439,28 @@ nsPrintSettingsWin::_Assign(nsIPrintSett
   return NS_OK;
 }
 
 //----------------------------------------------------------------------
 // Testing of assign and clone
 // This define turns on the testing module below
 // so at start up it writes and reads the prefs.
 #ifdef DEBUG_rodsX
-#include "nsIPrintOptions.h"
+#include "nsIPrintSettingsService.h"
 #include "nsIServiceManager.h"
 class Tester {
 public:
   Tester();
 };
 Tester::Tester()
 {
   nsCOMPtr<nsIPrintSettings> ps;
   nsresult rv;
-  nsCOMPtr<nsIPrintOptions> printService = do_GetService("@mozilla.org/gfx/printsettings-service;1", &rv);
+  nsCOMPtr<nsIPrintSettingsService> printService =
+    do_GetService("@mozilla.org/gfx/printsettings-service;1", &rv);
   if (NS_SUCCEEDED(rv)) {
     rv = printService->CreatePrintSettings(getter_AddRefs(ps));
   }
 
   if (ps) {
     ps->SetPrintOptions(nsIPrintSettings::kPrintOddPages,  true);
     ps->SetPrintOptions(nsIPrintSettings::kPrintEvenPages,  false);
     ps->SetMarginTop(1.0);
--- a/widget/windows/nsWidgetFactory.cpp
+++ b/widget/windows/nsWidgetFactory.cpp
@@ -135,17 +135,17 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(JumpListS
 NS_GENERIC_FACTORY_CONSTRUCTOR(WindowsUIUtils)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
 NS_GENERIC_FACTORY_CONSTRUCTOR(TaskbarPreviewCallback)
 #ifdef NS_PRINTING
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintDialogServiceWin, Init)
-NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintOptionsWin, Init)
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSettingsServiceWin, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrinterEnumeratorWin)
 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintSession, Init)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceContextSpecWin)
 #endif
 
 namespace mozilla {
 namespace widget {
 // This constructor should really be shared with all platforms.
@@ -209,17 +209,17 @@ static const mozilla::Module::CIDEntry k
   { &kNS_WIN_JUMPLISTLINK_CID, false, nullptr, JumpListLinkConstructor },
   { &kNS_WIN_JUMPLISTSHORTCUT_CID, false, nullptr, JumpListShortcutConstructor },
   { &kNS_WINDOWS_UIUTILS_CID, false, nullptr, WindowsUIUtilsConstructor },
   { &kNS_DRAGSERVICE_CID, false, nullptr, nsDragServiceConstructor, Module::MAIN_PROCESS_ONLY },
   { &kNS_BIDIKEYBOARD_CID, false, nullptr, nsBidiKeyboardConstructor, Module::MAIN_PROCESS_ONLY },
   { &kNS_TASKBARPREVIEWCALLBACK_CID, false, nullptr, TaskbarPreviewCallbackConstructor },
 #ifdef NS_PRINTING
   { &kNS_PRINTDIALOGSERVICE_CID, false, nullptr, nsPrintDialogServiceWinConstructor, Module::MAIN_PROCESS_ONLY },
-  { &kNS_PRINTSETTINGSSERVICE_CID, false, nullptr, nsPrintOptionsWinConstructor },
+  { &kNS_PRINTSETTINGSSERVICE_CID, false, nullptr, nsPrintSettingsServiceWinConstructor },
   { &kNS_PRINTER_ENUMERATOR_CID, false, nullptr, nsPrinterEnumeratorWinConstructor },
   { &kNS_PRINTSESSION_CID, false, nullptr, nsPrintSessionConstructor },
   { &kNS_DEVICE_CONTEXT_SPEC_CID, false, nullptr, nsDeviceContextSpecWinConstructor },
 #endif
   { nullptr }
 };
 
 static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {