Bug 1409972 - Part 6. Remove printingui implementation of each platform. r=mconley
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Fri, 10 Nov 2017 11:07:34 +0900
changeset 391633 854a8759f85545fc5b4f4ac0bf55f9291743d778
parent 391632 614c8b4d4a0d77f973ca370cd0a6f3cdd490d0d9
child 391634 c48580e1f535f64e7184900043d2c122b4d44ac4
push id32896
push userccoroiu@mozilla.com
push dateTue, 14 Nov 2017 10:22:27 +0000
treeherdermozilla-central@f9717fd3e226 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1409972
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 1409972 - Part 6. Remove printingui implementation of each platform. r=mconley MozReview-Commit-ID: BXocuT9zV0E
toolkit/components/printingui/mac/moz.build
toolkit/components/printingui/mac/nsPrintingPromptService.cpp
toolkit/components/printingui/mac/nsPrintingPromptService.h
toolkit/components/printingui/unixshared/moz.build
toolkit/components/printingui/unixshared/nsPrintProgress.cpp
toolkit/components/printingui/unixshared/nsPrintProgress.h
toolkit/components/printingui/unixshared/nsPrintProgressParams.cpp
toolkit/components/printingui/unixshared/nsPrintProgressParams.h
toolkit/components/printingui/unixshared/nsPrintingPromptService.cpp
toolkit/components/printingui/unixshared/nsPrintingPromptService.h
toolkit/components/printingui/win/moz.build
toolkit/components/printingui/win/nsPrintProgress.cpp
toolkit/components/printingui/win/nsPrintProgress.h
toolkit/components/printingui/win/nsPrintProgressParams.cpp
toolkit/components/printingui/win/nsPrintProgressParams.h
toolkit/components/printingui/win/nsPrintingPromptService.cpp
toolkit/components/printingui/win/nsPrintingPromptService.h
deleted file mode 100644
--- a/toolkit/components/printingui/mac/moz.build
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-UNIFIED_SOURCES += [
-    'nsPrintingPromptService.cpp',
-]
-
-FINAL_LIBRARY = 'xul'
deleted file mode 100644
--- a/toolkit/components/printingui/mac/nsPrintingPromptService.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- Mode: C++; 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/. */
-
-#include "nsPrintingPromptService.h"
-
-#include "nsCOMPtr.h"
-#include "nsServiceManagerUtils.h"
-
-#include "nsIPrintingPromptService.h"
-#include "nsIFactory.h"
-#include "nsIPrintDialogService.h"
-#include "nsPIDOMWindow.h"
-
-//*****************************************************************************
-// nsPrintingPromptService
-//*****************************************************************************
-
-NS_IMPL_ISUPPORTS(nsPrintingPromptService,
-                  nsIPrintingPromptService,
-                  nsIWebProgressListener)
-
-nsPrintingPromptService::nsPrintingPromptService() = default;
-
-nsPrintingPromptService::~nsPrintingPromptService() = default;
-
-nsresult
-nsPrintingPromptService::Init()
-{
-  return NS_OK;
-}
-
-//*****************************************************************************
-// nsPrintingPromptService::nsIPrintingPromptService
-//*****************************************************************************
-
-NS_IMETHODIMP
-nsPrintingPromptService::ShowPrintDialog(mozIDOMWindowProxy* parent,
-                                         nsIWebBrowserPrint* webBrowserPrint,
-                                         nsIPrintSettings* printSettings)
-{
-  nsCOMPtr<nsIPrintDialogService> dlgPrint(
-    do_GetService(NS_PRINTDIALOGSERVICE_CONTRACTID));
-  if (dlgPrint) {
-    return dlgPrint->Show(
-      nsPIDOMWindowOuter::From(parent), printSettings, webBrowserPrint);
-  }
-
-  return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::ShowProgress(
-  mozIDOMWindowProxy* parent,
-  nsIWebBrowserPrint* webBrowserPrint, // ok to be null
-  nsIPrintSettings* printSettings,     // ok to be null
-  nsIObserver* openDialogObserver,     // ok to be null
-  bool isForPrinting,
-  nsIWebProgressListener** webProgressListener,
-  nsIPrintProgressParams** printProgressParams,
-  bool* notifyOnOpen)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::ShowPageSetup(mozIDOMWindowProxy* parent,
-                                       nsIPrintSettings* printSettings,
-                                       nsIObserver* aObs)
-{
-  nsCOMPtr<nsIPrintDialogService> dlgPrint(
-    do_GetService(NS_PRINTDIALOGSERVICE_CONTRACTID));
-  if (dlgPrint) {
-    return dlgPrint->ShowPageSetup(nsPIDOMWindowOuter::From(parent),
-                                   printSettings);
-  }
-
-  return NS_ERROR_FAILURE;
-}
-
-//*****************************************************************************
-// nsPrintingPromptService::nsIWebProgressListener
-//*****************************************************************************
-
-NS_IMETHODIMP
-nsPrintingPromptService::OnStateChange(nsIWebProgress* aWebProgress,
-                                       nsIRequest* aRequest,
-                                       uint32_t aStateFlags,
-                                       nsresult aStatus)
-{
-  return NS_OK;
-}
-
-/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
-NS_IMETHODIMP
-nsPrintingPromptService::OnProgressChange(nsIWebProgress* aWebProgress,
-                                          nsIRequest* aRequest,
-                                          int32_t aCurSelfProgress,
-                                          int32_t aMaxSelfProgress,
-                                          int32_t aCurTotalProgress,
-                                          int32_t aMaxTotalProgress)
-{
-  return NS_OK;
-}
-
-/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location, in unsigned long aFlags); */
-NS_IMETHODIMP
-nsPrintingPromptService::OnLocationChange(nsIWebProgress* aWebProgress,
-                                          nsIRequest* aRequest,
-                                          nsIURI* location,
-                                          uint32_t aFlags)
-{
-  return NS_OK;
-}
-
-/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */
-NS_IMETHODIMP
-nsPrintingPromptService::OnStatusChange(nsIWebProgress* aWebProgress,
-                                        nsIRequest* aRequest,
-                                        nsresult aStatus,
-                                        const char16_t* aMessage)
-{
-  return NS_OK;
-}
-
-/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */
-NS_IMETHODIMP
-nsPrintingPromptService::OnSecurityChange(nsIWebProgress* aWebProgress,
-                                          nsIRequest* aRequest,
-                                          uint32_t state)
-{
-  return NS_OK;
-}
deleted file mode 100644
--- a/toolkit/components/printingui/mac/nsPrintingPromptService.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- 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 __nsPrintingPromptService_h
-#define __nsPrintingPromptService_h
-
-// {E042570C-62DE-4bb6-A6E0-798E3C07B4DF}
-#define NS_PRINTINGPROMPTSERVICE_CID                                           \
-  {                                                                            \
-    0xe042570c, 0x62de, 0x4bb6,                                                \
-    {                                                                          \
-      0xa6, 0xe0, 0x79, 0x8e, 0x3c, 0x7, 0xb4, 0xdf                            \
-    }                                                                          \
-  }
-#define NS_PRINTINGPROMPTSERVICE_CONTRACTID                                    \
-  "@mozilla.org/embedcomp/printingprompt-service;1"
-
-#include "nsCOMPtr.h"
-#include "nsIPrintingPromptService.h"
-#include "nsPIPromptService.h"
-#include "nsIWindowWatcher.h"
-
-// Printing Progress Includes
-#include "nsIWebProgressListener.h"
-
-class nsPrintingPromptService
-  : public nsIPrintingPromptService
-  , public nsIWebProgressListener
-{
-public:
-  nsPrintingPromptService();
-
-  nsresult Init();
-
-  NS_DECL_NSIPRINTINGPROMPTSERVICE
-  NS_DECL_NSIWEBPROGRESSLISTENER
-  NS_DECL_ISUPPORTS
-
-protected:
-  virtual ~nsPrintingPromptService();
-};
-
-#endif
deleted file mode 100644
--- a/toolkit/components/printingui/unixshared/moz.build
+++ /dev/null
@@ -1,13 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-UNIFIED_SOURCES += [
-    'nsPrintingPromptService.cpp',
-    'nsPrintProgress.cpp',
-    'nsPrintProgressParams.cpp',
-]
-
-FINAL_LIBRARY = 'xul'
deleted file mode 100644
--- a/toolkit/components/printingui/unixshared/nsPrintProgress.cpp
+++ /dev/null
@@ -1,267 +0,0 @@
-/* -*- 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/. */
-
-#include "nsPrintProgress.h"
-
-#include "nsArray.h"
-#include "nsIBaseWindow.h"
-#include "nsIDocShell.h"
-#include "nsIDocShellTreeOwner.h"
-#include "nsIInterfaceRequestorUtils.h"
-#include "nsIXULWindow.h"
-#include "nsXPCOM.h"
-#include "nsISupportsPrimitives.h"
-#include "nsIComponentManager.h"
-#include "nsPIDOMWindow.h"
-
-
-NS_IMPL_ADDREF(nsPrintProgress)
-NS_IMPL_RELEASE(nsPrintProgress)
-
-NS_INTERFACE_MAP_BEGIN(nsPrintProgress)
-   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIPrintStatusFeedback)
-   NS_INTERFACE_MAP_ENTRY(nsIPrintProgress)
-   NS_INTERFACE_MAP_ENTRY(nsIPrintStatusFeedback)
-   NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
-NS_INTERFACE_MAP_END_THREADSAFE
-
-
-nsPrintProgress::nsPrintProgress(nsIPrintSettings* aPrintSettings)
-{
-  m_closeProgress = false;
-  m_processCanceled = false;
-  m_pendingStateFlags = -1;
-  m_pendingStateValue = NS_OK;
-  m_PrintSetting = aPrintSettings;
-}
-
-nsPrintProgress::~nsPrintProgress()
-{
-  (void)ReleaseListeners();
-}
-
-NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(mozIDOMWindowProxy *parent,
-                                                  const char *dialogURL,
-                                                  nsISupports *parameters,
-                                                  nsIObserver *openDialogObserver,
-                                                  bool *notifyOnOpen)
-{
-  *notifyOnOpen = true;
-  m_observer = openDialogObserver;
-  nsresult rv = NS_ERROR_FAILURE;
-
-  if (m_dialog)
-    return NS_ERROR_ALREADY_INITIALIZED;
-
-  if (!dialogURL || !*dialogURL)
-    return NS_ERROR_INVALID_ARG;
-
-  if (parent)
-  {
-    // Set up window.arguments[0]...
-    nsCOMPtr<nsIMutableArray> array = nsArray::Create();
-
-    nsCOMPtr<nsISupportsInterfacePointer> ifptr =
-      do_CreateInstance(NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID, &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    ifptr->SetData(static_cast<nsIPrintProgress*>(this));
-    ifptr->SetDataIID(&NS_GET_IID(nsIPrintProgress));
-
-    array->AppendElement(ifptr);
-
-    array->AppendElement(parameters);
-
-    // We will set the opener of the dialog to be the nsIDOMWindow for the
-    // browser XUL window itself, as opposed to the content. That way, the
-    // progress window has access to the opener.
-    auto* pParentWindow = nsPIDOMWindowOuter::From(parent);
-    nsCOMPtr<nsIDocShell> docShell = pParentWindow->GetDocShell();
-    NS_ENSURE_STATE(docShell);
-
-    nsCOMPtr<nsIDocShellTreeOwner> owner;
-    docShell->GetTreeOwner(getter_AddRefs(owner));
-
-    nsCOMPtr<nsIXULWindow> ownerXULWindow = do_GetInterface(owner);
-    nsCOMPtr<mozIDOMWindowProxy> ownerWindow = do_GetInterface(ownerXULWindow);
-    NS_ENSURE_STATE(ownerWindow);
-
-    nsCOMPtr<nsPIDOMWindowOuter> piOwnerWindow = nsPIDOMWindowOuter::From(ownerWindow);
-
-    // Open the dialog.
-    nsCOMPtr<nsPIDOMWindowOuter> newWindow;
-
-    rv = piOwnerWindow->OpenDialog(NS_ConvertASCIItoUTF16(dialogURL),
-                                   NS_LITERAL_STRING("_blank"),
-                                   NS_LITERAL_STRING("chrome,titlebar,dependent,centerscreen"),
-                                   array, getter_AddRefs(newWindow));
-  }
-
-  return rv;
-}
-
-NS_IMETHODIMP nsPrintProgress::CloseProgressDialog(bool forceClose)
-{
-  m_closeProgress = true;
-  // XXX Invalid cast of bool to nsresult (bug 778106)
-  return OnStateChange(nullptr, nullptr, nsIWebProgressListener::STATE_STOP,
-                       (nsresult)forceClose);
-}
-
-NS_IMETHODIMP nsPrintProgress::GetPrompter(nsIPrompt **_retval)
-{
-  NS_ENSURE_ARG_POINTER(_retval);
-  *_retval = nullptr;
-
-  if (! m_closeProgress && m_dialog) {
-    nsCOMPtr<nsPIDOMWindowOuter> window = do_QueryInterface(m_dialog);
-    MOZ_ASSERT(window);
-    return window->GetPrompter(_retval);
-  }
-
-  return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP nsPrintProgress::GetProcessCanceledByUser(bool *aProcessCanceledByUser)
-{
-  NS_ENSURE_ARG_POINTER(aProcessCanceledByUser);
-  *aProcessCanceledByUser = m_processCanceled;
-  return NS_OK;
-}
-NS_IMETHODIMP nsPrintProgress::SetProcessCanceledByUser(bool aProcessCanceledByUser)
-{
-  if(m_PrintSetting)
-    m_PrintSetting->SetIsCancelled(true);
-  m_processCanceled = aProcessCanceledByUser;
-  OnStateChange(nullptr, nullptr, nsIWebProgressListener::STATE_STOP, NS_OK);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::RegisterListener(nsIWebProgressListener * listener)
-{
-  if (!listener) //Nothing to do with a null listener!
-    return NS_OK;
-
-  m_listenerList.AppendObject(listener);
-  if (m_closeProgress || m_processCanceled)
-    listener->OnStateChange(nullptr, nullptr, nsIWebProgressListener::STATE_STOP, NS_OK);
-  else
-  {
-    listener->OnStatusChange(nullptr, nullptr, NS_OK, m_pendingStatus.get());
-    if (m_pendingStateFlags != -1)
-      listener->OnStateChange(nullptr, nullptr, m_pendingStateFlags, m_pendingStateValue);
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::UnregisterListener(nsIWebProgressListener *listener)
-{
-  if (listener)
-    m_listenerList.RemoveObject(listener);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::DoneIniting()
-{
-  if (m_observer) {
-    m_observer->Observe(nullptr, nullptr, nullptr);
-  }
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t aStateFlags, nsresult aStatus)
-{
-  m_pendingStateFlags = aStateFlags;
-  m_pendingStateValue = aStatus;
-
-  uint32_t count = m_listenerList.Count();
-  for (uint32_t i = count - 1; i < count; i --)
-  {
-    nsCOMPtr<nsIWebProgressListener> progressListener = m_listenerList.SafeObjectAt(i);
-    if (progressListener)
-      progressListener->OnStateChange(aWebProgress, aRequest, aStateFlags, aStatus);
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, int32_t aCurSelfProgress, int32_t aMaxSelfProgress, int32_t aCurTotalProgress, int32_t aMaxTotalProgress)
-{
-  uint32_t count = m_listenerList.Count();
-  for (uint32_t i = count - 1; i < count; i --)
-  {
-    nsCOMPtr<nsIWebProgressListener> progressListener = m_listenerList.SafeObjectAt(i);
-    if (progressListener)
-      progressListener->OnProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress);
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *location, uint32_t aFlags)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP nsPrintProgress::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const char16_t *aMessage)
-{
-  if (aMessage && *aMessage)
-  m_pendingStatus = aMessage;
-
-  uint32_t count = m_listenerList.Count();
-  for (uint32_t i = count - 1; i < count; i --)
-  {
-    nsCOMPtr<nsIWebProgressListener> progressListener = m_listenerList.SafeObjectAt(i);
-    if (progressListener)
-      progressListener->OnStatusChange(aWebProgress, aRequest, aStatus, aMessage);
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t state)
-{
-    return NS_OK;
-}
-
-nsresult nsPrintProgress::ReleaseListeners()
-{
-  m_listenerList.Clear();
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::ShowStatusString(const char16_t *status)
-{
-  return OnStatusChange(nullptr, nullptr, NS_OK, status);
-}
-
-NS_IMETHODIMP nsPrintProgress::StartMeteors()
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP nsPrintProgress::StopMeteors()
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP nsPrintProgress::ShowProgress(int32_t percent)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, mozIDOMWindowProxy *window)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP nsPrintProgress::CloseWindow()
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
deleted file mode 100644
--- a/toolkit/components/printingui/unixshared/nsPrintProgress.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- 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 __nsPrintProgress_h
-#define __nsPrintProgress_h
-
-#include "nsIPrintProgress.h"
-#include "nsIPrintingPromptService.h"
-
-#include "nsCOMArray.h"
-#include "nsCOMPtr.h"
-#include "nsIDOMWindow.h"
-#include "nsIPrintStatusFeedback.h"
-#include "nsIObserver.h"
-#include "nsString.h"
-
-class nsPrintProgress : public nsIPrintProgress, public nsIPrintStatusFeedback
-{
-public:
-	NS_DECL_THREADSAFE_ISUPPORTS
-  NS_DECL_NSIPRINTPROGRESS
-  NS_DECL_NSIWEBPROGRESSLISTENER
-  NS_DECL_NSIPRINTSTATUSFEEDBACK
-
-  explicit nsPrintProgress(nsIPrintSettings* aPrintSettings);
-
-protected:
-	virtual ~nsPrintProgress();
-
-private:
-  nsresult ReleaseListeners();
-
-  bool                              m_closeProgress;
-  bool                              m_processCanceled;
-  nsString                          m_pendingStatus;
-  int32_t                           m_pendingStateFlags;
-  nsresult                          m_pendingStateValue;
-  nsCOMPtr<nsIDOMWindow>            m_dialog;
-  nsCOMArray<nsIWebProgressListener>        m_listenerList;
-  nsCOMPtr<nsIObserver>             m_observer;
-  nsCOMPtr<nsIPrintSettings>        m_PrintSetting;
-};
-
-#endif
deleted file mode 100644
--- a/toolkit/components/printingui/unixshared/nsPrintProgressParams.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- 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/. */
-
-#include "nsPrintProgressParams.h"
-#include "nsReadableUtils.h"
-
-
-NS_IMPL_ISUPPORTS(nsPrintProgressParams, nsIPrintProgressParams)
-
-nsPrintProgressParams::nsPrintProgressParams()
-{
-}
-
-nsPrintProgressParams::~nsPrintProgressParams()
-{
-}
-
-NS_IMETHODIMP
-nsPrintProgressParams::GetDocTitle(nsAString& aDocTitle)
-{
-  aDocTitle = mDocTitle;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintProgressParams::SetDocTitle(const nsAString& aDocTitle)
-{
-  mDocTitle = aDocTitle;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintProgressParams::GetDocURL(nsAString& aDocURL)
-{
-  aDocURL = mDocURL;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintProgressParams::SetDocURL(const nsAString& aDocURL)
-{
-  mDocURL = aDocURL;
-  return NS_OK;
-}
-
deleted file mode 100644
--- a/toolkit/components/printingui/unixshared/nsPrintProgressParams.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- 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 __nsPrintProgressParams_h
-#define __nsPrintProgressParams_h
-
-#include "nsIPrintProgressParams.h"
-#include "nsString.h"
-
-class nsPrintProgressParams : public nsIPrintProgressParams
-{
-public:
-	NS_DECL_ISUPPORTS
-  NS_DECL_NSIPRINTPROGRESSPARAMS
-
-	nsPrintProgressParams();
-
-protected:
-	virtual ~nsPrintProgressParams();
-
-private:
-  nsString mDocTitle;
-  nsString mDocURL;
-};
-
-#endif
deleted file mode 100644
--- a/toolkit/components/printingui/unixshared/nsPrintingPromptService.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* 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/. */
-
-#include "nsPrintingPromptService.h"
-
-#include "nsIDOMWindow.h"
-#include "nsIServiceManager.h"
-#include "nsISupportsUtils.h"
-#include "nsString.h"
-#include "nsIPrintDialogService.h"
-
-// Printing Progress Includes
-#include "nsPrintProgress.h"
-#include "nsPrintProgressParams.h"
-
-static const char* kPrintProgressDialogURL =
-  "chrome://global/content/printProgress.xul";
-static const char* kPrtPrvProgressDialogURL =
-  "chrome://global/content/printPreviewProgress.xul";
-
-NS_IMPL_ISUPPORTS(nsPrintingPromptService,
-                  nsIPrintingPromptService,
-                  nsIWebProgressListener)
-
-nsPrintingPromptService::nsPrintingPromptService() = default;
-
-nsPrintingPromptService::~nsPrintingPromptService() = default;
-
-nsresult
-nsPrintingPromptService::Init()
-{
-  nsresult rv;
-  mWatcher = do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv);
-  return rv;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::ShowPrintDialog(mozIDOMWindowProxy* parent,
-                                         nsIWebBrowserPrint* webBrowserPrint,
-                                         nsIPrintSettings* printSettings)
-{
-  NS_ENSURE_ARG(webBrowserPrint);
-  NS_ENSURE_ARG(printSettings);
-
-  nsCOMPtr<nsIPrintDialogService> dlgPrint(
-    do_GetService(NS_PRINTDIALOGSERVICE_CONTRACTID));
-  if (dlgPrint)
-    return dlgPrint->Show(
-      nsPIDOMWindowOuter::From(parent), printSettings, webBrowserPrint);
-
-  return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::ShowProgress(
-  mozIDOMWindowProxy* parent,
-  nsIWebBrowserPrint* webBrowserPrint, // ok to be null
-  nsIPrintSettings* printSettings,     // ok to be null
-  nsIObserver* openDialogObserver,     // ok to be null
-  bool isForPrinting,
-  nsIWebProgressListener** webProgressListener,
-  nsIPrintProgressParams** printProgressParams,
-  bool* notifyOnOpen)
-{
-  NS_ENSURE_ARG(webProgressListener);
-  NS_ENSURE_ARG(printProgressParams);
-  NS_ENSURE_ARG(notifyOnOpen);
-
-  *notifyOnOpen = false;
-
-  nsPrintProgress* prtProgress = new nsPrintProgress(printSettings);
-  mPrintProgress = prtProgress;
-  mWebProgressListener = prtProgress;
-
-  nsCOMPtr<nsIPrintProgressParams> prtProgressParams =
-    new nsPrintProgressParams();
-
-  nsCOMPtr<mozIDOMWindowProxy> parentWindow = parent;
-
-  if (mWatcher && !parentWindow) {
-    mWatcher->GetActiveWindow(getter_AddRefs(parentWindow));
-  }
-
-  if (parentWindow) {
-    mPrintProgress->OpenProgressDialog(parentWindow,
-                                       isForPrinting ? kPrintProgressDialogURL
-                                                     : kPrtPrvProgressDialogURL,
-                                       prtProgressParams,
-                                       openDialogObserver,
-                                       notifyOnOpen);
-  }
-
-  prtProgressParams.forget(printProgressParams);
-  NS_ADDREF(*webProgressListener = this);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::ShowPageSetup(mozIDOMWindowProxy* parent,
-                                       nsIPrintSettings* printSettings,
-                                       nsIObserver* aObs)
-{
-  NS_ENSURE_ARG(printSettings);
-
-  nsCOMPtr<nsIPrintDialogService> dlgPrint(
-    do_GetService(NS_PRINTDIALOGSERVICE_CONTRACTID));
-  if (dlgPrint)
-    return dlgPrint->ShowPageSetup(nsPIDOMWindowOuter::From(parent),
-                                   printSettings);
-
-  return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::OnStateChange(nsIWebProgress* aWebProgress,
-                                       nsIRequest* aRequest,
-                                       uint32_t aStateFlags,
-                                       nsresult aStatus)
-{
-  if ((aStateFlags & STATE_STOP) && mWebProgressListener) {
-    mWebProgressListener->OnStateChange(
-      aWebProgress, aRequest, aStateFlags, aStatus);
-    if (mPrintProgress) {
-      mPrintProgress->CloseProgressDialog(true);
-    }
-    mPrintProgress = nullptr;
-    mWebProgressListener = nullptr;
-  }
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::OnProgressChange(nsIWebProgress* aWebProgress,
-                                          nsIRequest* aRequest,
-                                          int32_t aCurSelfProgress,
-                                          int32_t aMaxSelfProgress,
-                                          int32_t aCurTotalProgress,
-                                          int32_t aMaxTotalProgress)
-{
-  if (mWebProgressListener) {
-    return mWebProgressListener->OnProgressChange(aWebProgress,
-                                                  aRequest,
-                                                  aCurSelfProgress,
-                                                  aMaxSelfProgress,
-                                                  aCurTotalProgress,
-                                                  aMaxTotalProgress);
-  }
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::OnLocationChange(nsIWebProgress* aWebProgress,
-                                          nsIRequest* aRequest,
-                                          nsIURI* location,
-                                          uint32_t aFlags)
-{
-  if (mWebProgressListener) {
-    return mWebProgressListener->OnLocationChange(
-      aWebProgress, aRequest, location, aFlags);
-  }
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::OnStatusChange(nsIWebProgress* aWebProgress,
-                                        nsIRequest* aRequest,
-                                        nsresult aStatus,
-                                        const char16_t* aMessage)
-{
-  if (mWebProgressListener) {
-    return mWebProgressListener->OnStatusChange(
-      aWebProgress, aRequest, aStatus, aMessage);
-  }
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::OnSecurityChange(nsIWebProgress* aWebProgress,
-                                          nsIRequest* aRequest,
-                                          uint32_t state)
-{
-  if (mWebProgressListener) {
-    return mWebProgressListener->OnSecurityChange(
-      aWebProgress, aRequest, state);
-  }
-  return NS_OK;
-}
deleted file mode 100644
--- a/toolkit/components/printingui/unixshared/nsPrintingPromptService.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- 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 __nsPrintingPromptService_h
-#define __nsPrintingPromptService_h
-
-// {E042570C-62DE-4bb6-A6E0-798E3C07B4DF}
-#define NS_PRINTINGPROMPTSERVICE_CID                                           \
-  {                                                                            \
-    0xe042570c, 0x62de, 0x4bb6,                                                \
-    {                                                                          \
-      0xa6, 0xe0, 0x79, 0x8e, 0x3c, 0x7, 0xb4, 0xdf                            \
-    }                                                                          \
-  }
-#define NS_PRINTINGPROMPTSERVICE_CONTRACTID                                    \
-  "@mozilla.org/embedcomp/printingprompt-service;1"
-
-#include "nsCOMPtr.h"
-#include "nsIPrintingPromptService.h"
-#include "nsPIPromptService.h"
-#include "nsIWindowWatcher.h"
-
-// Printing Progress Includes
-#include "nsPrintProgress.h"
-#include "nsIWebProgressListener.h"
-
-class nsIDOMWindow;
-class nsIDialogParamBlock;
-
-class nsPrintingPromptService
-  : public nsIPrintingPromptService
-  , public nsIWebProgressListener
-{
-
-public:
-  nsPrintingPromptService();
-
-  nsresult Init();
-
-  NS_DECL_NSIPRINTINGPROMPTSERVICE
-  NS_DECL_NSIWEBPROGRESSLISTENER
-  NS_DECL_ISUPPORTS
-
-protected:
-  virtual ~nsPrintingPromptService();
-
-private:
-  nsCOMPtr<nsIWindowWatcher> mWatcher;
-  nsCOMPtr<nsIPrintProgress> mPrintProgress;
-  nsCOMPtr<nsIWebProgressListener> mWebProgressListener;
-};
-
-#endif
deleted file mode 100644
--- a/toolkit/components/printingui/win/moz.build
+++ /dev/null
@@ -1,13 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-UNIFIED_SOURCES += [
-    'nsPrintingPromptService.cpp',
-    'nsPrintProgress.cpp',
-    'nsPrintProgressParams.cpp',
-]
-
-FINAL_LIBRARY = 'xul'
deleted file mode 100644
--- a/toolkit/components/printingui/win/nsPrintProgress.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-/* -*- 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/. */
-
-#include "nsPrintProgress.h"
-
-#include "nsArray.h"
-#include "nsIBaseWindow.h"
-#include "nsIDocShell.h"
-#include "nsIDocShellTreeOwner.h"
-#include "nsIInterfaceRequestorUtils.h"
-#include "nsIXULWindow.h"
-#include "nsXPCOM.h"
-#include "nsISupportsPrimitives.h"
-#include "nsIComponentManager.h"
-#include "nsIServiceManager.h"
-#include "nsPIDOMWindow.h"
-
-#if 0
-NS_IMPL_ADDREF(nsPrintProgress)
-NS_IMPL_RELEASE(nsPrintProgress)
-#else
-NS_IMETHODIMP_(MozExternalRefCountType) nsPrintProgress::AddRef(void)
-{
-  NS_PRECONDITION(int32_t(mRefCnt) >= 0, "illegal refcnt");
-  nsrefcnt count;
-  count = ++mRefCnt;
-  //NS_LOG_ADDREF(this, count, "nsPrintProgress", sizeof(*this));
-  return count;
-}
-
-NS_IMETHODIMP_(MozExternalRefCountType) nsPrintProgress::Release(void)
-{
-  nsrefcnt count;
-  NS_PRECONDITION(0 != mRefCnt, "dup release");
-  count = --mRefCnt;
-  //NS_LOG_RELEASE(this, count, "nsPrintProgress");
-  if (0 == count) {
-    mRefCnt = 1; /* stabilize */
-    /* enable this to find non-threadsafe destructors: */
-    /* NS_ASSERT_OWNINGTHREAD(nsPrintProgress); */
-    delete this;
-    return 0;
-  }
-  return count;
-}
-
-#endif
-
-NS_INTERFACE_MAP_BEGIN(nsPrintProgress)
-   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIPrintStatusFeedback)
-   NS_INTERFACE_MAP_ENTRY(nsIPrintProgress)
-   NS_INTERFACE_MAP_ENTRY(nsIPrintStatusFeedback)
-   NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
-NS_INTERFACE_MAP_END_THREADSAFE
-
-
-nsPrintProgress::nsPrintProgress()
-{
-  m_closeProgress = false;
-  m_processCanceled = false;
-  m_pendingStateFlags = -1;
-  m_pendingStateValue = NS_OK;
-}
-
-nsPrintProgress::~nsPrintProgress()
-{
-  (void)ReleaseListeners();
-}
-
-NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(mozIDOMWindowProxy *parent,
-                                                  const char *dialogURL,
-                                                  nsISupports *parameters,
-                                                  nsIObserver *openDialogObserver,
-                                                  bool *notifyOnOpen)
-{
-  *notifyOnOpen = true;
-  m_observer = openDialogObserver;
-
-  nsresult rv = NS_ERROR_FAILURE;
-
-  if (m_dialog)
-    return NS_ERROR_ALREADY_INITIALIZED;
-
-  if (!dialogURL || !*dialogURL)
-    return NS_ERROR_INVALID_ARG;
-
-  if (parent)
-  {
-    // Set up window.arguments[0]...
-    nsCOMPtr<nsIMutableArray> array = nsArray::Create();
-
-    nsCOMPtr<nsISupportsInterfacePointer> ifptr =
-      do_CreateInstance(NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID, &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    ifptr->SetData(static_cast<nsIPrintProgress*>(this));
-    ifptr->SetDataIID(&NS_GET_IID(nsIPrintProgress));
-
-    array->AppendElement(ifptr);
-
-    array->AppendElement(parameters);
-
-    // We will set the opener of the dialog to be the nsIDOMWindow for the
-    // browser XUL window itself, as opposed to the content. That way, the
-    // progress window has access to the opener.
-    nsCOMPtr<nsPIDOMWindowOuter> pParentWindow = nsPIDOMWindowOuter::From(parent);
-    NS_ENSURE_STATE(pParentWindow);
-
-    nsCOMPtr<nsIDocShell> docShell = pParentWindow->GetDocShell();
-    NS_ENSURE_STATE(docShell);
-
-    nsCOMPtr<nsIDocShellTreeOwner> owner;
-    docShell->GetTreeOwner(getter_AddRefs(owner));
-
-    nsCOMPtr<nsIXULWindow> ownerXULWindow = do_GetInterface(owner);
-    nsCOMPtr<mozIDOMWindowProxy> ownerWindow = do_GetInterface(ownerXULWindow);
-    NS_ENSURE_STATE(ownerWindow);
-
-    nsCOMPtr<nsPIDOMWindowOuter> piOwnerWindow = nsPIDOMWindowOuter::From(ownerWindow);
-
-    // Open the dialog.
-    nsCOMPtr<nsPIDOMWindowOuter> newWindow;
-    rv = piOwnerWindow->OpenDialog(NS_ConvertASCIItoUTF16(dialogURL),
-                                   NS_LITERAL_STRING("_blank"),
-                                   NS_LITERAL_STRING("chrome,titlebar,dependent,centerscreen"),
-                                   array, getter_AddRefs(newWindow));
-  }
-
-  return rv;
-}
-
-NS_IMETHODIMP nsPrintProgress::CloseProgressDialog(bool forceClose)
-{
-  m_closeProgress = true;
-  // XXX Casting from bool to nsresult
-  return OnStateChange(nullptr, nullptr, nsIWebProgressListener::STATE_STOP,
-                       static_cast<nsresult>(forceClose));
-}
-
-NS_IMETHODIMP nsPrintProgress::GetPrompter(nsIPrompt **_retval)
-{
-  NS_ENSURE_ARG_POINTER(_retval);
-  *_retval = nullptr;
-
-  if (! m_closeProgress && m_dialog) {
-    nsCOMPtr<nsPIDOMWindowOuter> window = do_QueryInterface(m_dialog);
-    MOZ_ASSERT(window);
-    return window->GetPrompter(_retval);
-  }
-
-  return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP nsPrintProgress::GetProcessCanceledByUser(bool *aProcessCanceledByUser)
-{
-  NS_ENSURE_ARG_POINTER(aProcessCanceledByUser);
-  *aProcessCanceledByUser = m_processCanceled;
-  return NS_OK;
-}
-NS_IMETHODIMP nsPrintProgress::SetProcessCanceledByUser(bool aProcessCanceledByUser)
-{
-  m_processCanceled = aProcessCanceledByUser;
-  OnStateChange(nullptr, nullptr, nsIWebProgressListener::STATE_STOP, NS_OK);
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::RegisterListener(nsIWebProgressListener * listener)
-{
-  if (!listener) //Nothing to do with a null listener!
-    return NS_OK;
-
-  m_listenerList.AppendObject(listener);
-  if (m_closeProgress || m_processCanceled)
-    listener->OnStateChange(nullptr, nullptr,
-                            nsIWebProgressListener::STATE_STOP, NS_OK);
-  else
-  {
-    listener->OnStatusChange(nullptr, nullptr, NS_OK, m_pendingStatus.get());
-    if (m_pendingStateFlags != -1)
-      listener->OnStateChange(nullptr, nullptr, m_pendingStateFlags, m_pendingStateValue);
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::UnregisterListener(nsIWebProgressListener *listener)
-{
-  if (listener)
-    m_listenerList.RemoveObject(listener);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::DoneIniting()
-{
-  if (m_observer) {
-    m_observer->Observe(nullptr, nullptr, nullptr);
-  }
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t aStateFlags, nsresult aStatus)
-{
-  m_pendingStateFlags = aStateFlags;
-  m_pendingStateValue = aStatus;
-
-  uint32_t count = m_listenerList.Count();
-  for (uint32_t i = count - 1; i < count; i --)
-  {
-    nsCOMPtr<nsIWebProgressListener> progressListener = m_listenerList.SafeObjectAt(i);
-    if (progressListener)
-      progressListener->OnStateChange(aWebProgress, aRequest, aStateFlags, aStatus);
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, int32_t aCurSelfProgress, int32_t aMaxSelfProgress, int32_t aCurTotalProgress, int32_t aMaxTotalProgress)
-{
-  uint32_t count = m_listenerList.Count();
-  for (uint32_t i = count - 1; i < count; i --)
-  {
-    nsCOMPtr<nsIWebProgressListener> progressListener = m_listenerList.SafeObjectAt(i);
-    if (progressListener)
-      progressListener->OnProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress);
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *location, uint32_t aFlags)
-{
-    return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const char16_t *aMessage)
-{
-  if (aMessage && *aMessage)
-  m_pendingStatus = aMessage;
-
-  uint32_t count = m_listenerList.Count();
-  for (uint32_t i = count - 1; i < count; i --)
-  {
-    nsCOMPtr<nsIWebProgressListener> progressListener = m_listenerList.SafeObjectAt(i);
-    if (progressListener)
-      progressListener->OnStatusChange(aWebProgress, aRequest, aStatus, aMessage);
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t state)
-{
-    return NS_OK;
-}
-
-nsresult nsPrintProgress::ReleaseListeners()
-{
-  m_listenerList.Clear();
-  return NS_OK;
-}
-
-NS_IMETHODIMP nsPrintProgress::ShowStatusString(const char16_t *status)
-{
-  return OnStatusChange(nullptr, nullptr, NS_OK, status);
-}
-
-NS_IMETHODIMP nsPrintProgress::StartMeteors()
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP nsPrintProgress::StopMeteors()
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP nsPrintProgress::ShowProgress(int32_t percent)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP nsPrintProgress::SetDocShell(nsIDocShell *shell, mozIDOMWindowProxy *window)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
-NS_IMETHODIMP nsPrintProgress::CloseWindow()
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
deleted file mode 100644
--- a/toolkit/components/printingui/win/nsPrintProgress.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- 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 __nsPrintProgress_h
-#define __nsPrintProgress_h
-
-#include "nsIPrintProgress.h"
-
-#include "nsCOMArray.h"
-#include "nsCOMPtr.h"
-#include "nsIDOMWindow.h"
-#include "nsIPrintStatusFeedback.h"
-#include "nsString.h"
-#include "nsIWindowWatcher.h"
-#include "nsIObserver.h"
-
-class nsPrintProgress : public nsIPrintProgress, public nsIPrintStatusFeedback
-{
-public:
-  NS_DECL_THREADSAFE_ISUPPORTS
-  NS_DECL_NSIPRINTPROGRESS
-  NS_DECL_NSIWEBPROGRESSLISTENER
-  NS_DECL_NSIPRINTSTATUSFEEDBACK
-
-	nsPrintProgress();
-	virtual ~nsPrintProgress();
-
-private:
-  nsresult ReleaseListeners();
-
-  bool                              m_closeProgress;
-  bool                              m_processCanceled;
-  nsString                          m_pendingStatus;
-  int32_t                           m_pendingStateFlags;
-  nsresult                          m_pendingStateValue;
-  nsCOMPtr<nsIDOMWindow>            m_dialog;
-  nsCOMArray<nsIWebProgressListener>        m_listenerList;
-  nsCOMPtr<nsIObserver>             m_observer;
-};
-
-#endif
deleted file mode 100644
--- a/toolkit/components/printingui/win/nsPrintProgressParams.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- 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/. */
-
-#include "nsPrintProgressParams.h"
-#include "nsReadableUtils.h"
-
-
-NS_IMPL_ISUPPORTS(nsPrintProgressParams, nsIPrintProgressParams)
-
-nsPrintProgressParams::nsPrintProgressParams()
-{
-}
-
-nsPrintProgressParams::~nsPrintProgressParams()
-{
-}
-
-NS_IMETHODIMP
-nsPrintProgressParams::GetDocTitle(nsAString& aDocTitle)
-{
-  aDocTitle = mDocTitle;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintProgressParams::SetDocTitle(const nsAString& aDocTitle)
-{
-  mDocTitle = aDocTitle;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintProgressParams::GetDocURL(nsAString& aDocURL)
-{
-  aDocURL = mDocURL;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintProgressParams::SetDocURL(const nsAString& aDocURL)
-{
-  mDocURL = aDocURL;
-  return NS_OK;
-}
-
deleted file mode 100644
--- a/toolkit/components/printingui/win/nsPrintProgressParams.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- 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 __nsPrintProgressParams_h
-#define __nsPrintProgressParams_h
-
-#include "nsIPrintProgressParams.h"
-#include "nsString.h"
-
-class nsPrintProgressParams : public nsIPrintProgressParams
-{
-	virtual ~nsPrintProgressParams();
-
-public:
-	NS_DECL_ISUPPORTS
-  NS_DECL_NSIPRINTPROGRESSPARAMS
-
-	nsPrintProgressParams();
-
-private:
-  nsString mDocTitle;
-  nsString mDocURL;
-};
-
-#endif
deleted file mode 100644
--- a/toolkit/components/printingui/win/nsPrintingPromptService.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * 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/. */
-
-#include "nsPrintingPromptService.h"
-
-#include "nsIPrintingPromptService.h"
-#include "nsIServiceManager.h"
-#include "nsIPrintDialogService.h"
-
-// Printing Progress Includes
-#include "nsPrintProgress.h"
-#include "nsPrintProgressParams.h"
-#include "nsIWebProgressListener.h"
-
-static const char* kPrintProgressDialogURL =
-  "chrome://global/content/printProgress.xul";
-static const char* kPrtPrvProgressDialogURL =
-  "chrome://global/content/printPreviewProgress.xul";
-
-NS_IMPL_ISUPPORTS(nsPrintingPromptService,
-                  nsIPrintingPromptService,
-                  nsIWebProgressListener)
-
-nsPrintingPromptService::nsPrintingPromptService() = default;
-
-//-----------------------------------------------------------
-nsPrintingPromptService::~nsPrintingPromptService() = default;
-
-//-----------------------------------------------------------
-nsresult
-nsPrintingPromptService::Init()
-{
-  nsresult rv;
-  mWatcher = do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv);
-  return rv;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// nsIPrintingPromptService
-
-//-----------------------------------------------------------
-NS_IMETHODIMP
-nsPrintingPromptService::ShowPrintDialog(mozIDOMWindowProxy* parent,
-                                         nsIWebBrowserPrint* webBrowserPrint,
-                                         nsIPrintSettings* printSettings)
-{
-  NS_ENSURE_ARG(parent);
-
-  nsCOMPtr<nsIPrintDialogService> dlgPrint(
-    do_GetService(NS_PRINTDIALOGSERVICE_CONTRACTID));
-  if (dlgPrint)
-    return dlgPrint->Show(
-      nsPIDOMWindowOuter::From(parent), printSettings, webBrowserPrint);
-
-  return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::ShowProgress(
-  mozIDOMWindowProxy* parent,
-  nsIWebBrowserPrint* webBrowserPrint, // ok to be null
-  nsIPrintSettings* printSettings,     // ok to be null
-  nsIObserver* openDialogObserver,     // ok to be null
-  bool isForPrinting,
-  nsIWebProgressListener** webProgressListener,
-  nsIPrintProgressParams** printProgressParams,
-  bool* notifyOnOpen)
-{
-  NS_ENSURE_ARG(webProgressListener);
-  NS_ENSURE_ARG(printProgressParams);
-  NS_ENSURE_ARG(notifyOnOpen);
-
-  *notifyOnOpen = false;
-  if (mPrintProgress) {
-    *webProgressListener = nullptr;
-    *printProgressParams = nullptr;
-    return NS_ERROR_FAILURE;
-  }
-
-  nsPrintProgress* prtProgress = new nsPrintProgress();
-  mPrintProgress = prtProgress;
-  mWebProgressListener = prtProgress;
-
-  nsCOMPtr<nsIPrintProgressParams> prtProgressParams =
-    new nsPrintProgressParams();
-
-  nsCOMPtr<mozIDOMWindowProxy> parentWindow = parent;
-
-  if (mWatcher && !parentWindow) {
-    mWatcher->GetActiveWindow(getter_AddRefs(parentWindow));
-  }
-
-  if (parentWindow) {
-    mPrintProgress->OpenProgressDialog(parentWindow,
-                                       isForPrinting ? kPrintProgressDialogURL
-                                                     : kPrtPrvProgressDialogURL,
-                                       prtProgressParams,
-                                       openDialogObserver,
-                                       notifyOnOpen);
-  }
-
-  prtProgressParams.forget(printProgressParams);
-  NS_ADDREF(*webProgressListener = this);
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::ShowPageSetup(mozIDOMWindowProxy* parent,
-                                       nsIPrintSettings* printSettings,
-                                       nsIObserver* aObs)
-{
-  NS_ENSURE_ARG(printSettings);
-
-  nsCOMPtr<nsIPrintDialogService> dlgPrint(
-    do_GetService(NS_PRINTDIALOGSERVICE_CONTRACTID));
-  if (dlgPrint)
-    return dlgPrint->ShowPageSetup(nsPIDOMWindowOuter::From(parent),
-                                   printSettings);
-
-  return NS_ERROR_FAILURE;
-}
-
-//////////////////////////////////////////////////////////////////////
-// nsIWebProgressListener
-//////////////////////////////////////////////////////////////////////
-
-NS_IMETHODIMP
-nsPrintingPromptService::OnStateChange(nsIWebProgress* aWebProgress,
-                                       nsIRequest* aRequest,
-                                       uint32_t aStateFlags,
-                                       nsresult aStatus)
-{
-  if ((aStateFlags & STATE_STOP) && mWebProgressListener) {
-    mWebProgressListener->OnStateChange(
-      aWebProgress, aRequest, aStateFlags, aStatus);
-    if (mPrintProgress) {
-      mPrintProgress->CloseProgressDialog(true);
-    }
-    mPrintProgress = nullptr;
-    mWebProgressListener = nullptr;
-  }
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::OnProgressChange(nsIWebProgress* aWebProgress,
-                                          nsIRequest* aRequest,
-                                          int32_t aCurSelfProgress,
-                                          int32_t aMaxSelfProgress,
-                                          int32_t aCurTotalProgress,
-                                          int32_t aMaxTotalProgress)
-{
-  if (mWebProgressListener) {
-    return mWebProgressListener->OnProgressChange(aWebProgress,
-                                                  aRequest,
-                                                  aCurSelfProgress,
-                                                  aMaxSelfProgress,
-                                                  aCurTotalProgress,
-                                                  aMaxTotalProgress);
-  }
-  return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::OnLocationChange(nsIWebProgress* aWebProgress,
-                                          nsIRequest* aRequest,
-                                          nsIURI* location,
-                                          uint32_t aFlags)
-{
-  if (mWebProgressListener) {
-    return mWebProgressListener->OnLocationChange(
-      aWebProgress, aRequest, location, aFlags);
-  }
-  return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::OnStatusChange(nsIWebProgress* aWebProgress,
-                                        nsIRequest* aRequest,
-                                        nsresult aStatus,
-                                        const char16_t* aMessage)
-{
-  if (mWebProgressListener) {
-    return mWebProgressListener->OnStatusChange(
-      aWebProgress, aRequest, aStatus, aMessage);
-  }
-  return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsPrintingPromptService::OnSecurityChange(nsIWebProgress* aWebProgress,
-                                          nsIRequest* aRequest,
-                                          uint32_t state)
-{
-  if (mWebProgressListener) {
-    return mWebProgressListener->OnSecurityChange(
-      aWebProgress, aRequest, state);
-  }
-  return NS_ERROR_FAILURE;
-}
deleted file mode 100644
--- a/toolkit/components/printingui/win/nsPrintingPromptService.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- 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 __nsPrintingPromptService_h
-#define __nsPrintingPromptService_h
-
-#include <windows.h>
-
-// {E042570C-62DE-4bb6-A6E0-798E3C07B4DF}
-#define NS_PRINTINGPROMPTSERVICE_CID                                           \
-  {                                                                            \
-    0xe042570c, 0x62de, 0x4bb6,                                                \
-    {                                                                          \
-      0xa6, 0xe0, 0x79, 0x8e, 0x3c, 0x7, 0xb4, 0xdf                            \
-    }                                                                          \
-  }
-#define NS_PRINTINGPROMPTSERVICE_CONTRACTID                                    \
-  "@mozilla.org/embedcomp/printingprompt-service;1"
-
-#include "nsCOMPtr.h"
-#include "nsIPrintingPromptService.h"
-#include "nsPIPromptService.h"
-#include "nsIWindowWatcher.h"
-
-// Printing Progress Includes
-#include "nsPrintProgress.h"
-#include "nsPrintProgressParams.h"
-#include "nsIWebProgressListener.h"
-
-class nsIDOMWindow;
-class nsIDialogParamBlock;
-
-class nsPrintingPromptService
-  : public nsIPrintingPromptService
-  , public nsIWebProgressListener
-{
-  virtual ~nsPrintingPromptService();
-
-public:
-  nsPrintingPromptService();
-
-  nsresult Init();
-
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIPRINTINGPROMPTSERVICE
-  NS_DECL_NSIWEBPROGRESSLISTENER
-
-private:
-  nsCOMPtr<nsIWindowWatcher> mWatcher;
-  nsCOMPtr<nsIPrintProgress> mPrintProgress;
-  nsCOMPtr<nsIWebProgressListener> mWebProgressListener;
-};
-
-#endif