Bug 1411121 - Part 3: Remove the nsIPrintingPromptService::showPrinterProperties() r=mconley
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Mon, 06 Nov 2017 09:27:05 +0900
changeset 443536 db6983d22fd31179be27602dd1b66138f6f8fc87
parent 443535 1ca360e198808af99ed35305d1a6a37fe87452f6
child 443537 110873e70443c09818ac49a8000097d22316a92f
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1411121
milestone58.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 1411121 - Part 3: Remove the nsIPrintingPromptService::showPrinterProperties() r=mconley We can remove nsIPrintingPromptService::showPrinterProperties() since this caller doesn't exist and this implementation of each platform returns NS_ERROR_NOT_IMPLEMENTED. MozReview-Commit-ID: 4s4ncv9U5Od
toolkit/components/browser/nsIPrintingPromptService.idl
toolkit/components/printingui/ipc/nsPrintingProxy.cpp
toolkit/components/printingui/mac/nsPrintingPromptService.cpp
toolkit/components/printingui/unixshared/nsPrintingPromptService.cpp
toolkit/components/printingui/win/nsPrintingPromptService.cpp
--- a/toolkit/components/browser/nsIPrintingPromptService.idl
+++ b/toolkit/components/browser/nsIPrintingPromptService.idl
@@ -9,17 +9,17 @@
 #include "nsIWebBrowserPrint.idl"
 #include "nsIWebProgressListener.idl"
 #include "nsIPrintProgressParams.idl"
 #include "nsIPrintSettings.idl"
 #include "nsIObserver.idl"
 
 interface nsIDOMWindow;
 
-[scriptable, uuid(328daa3e-09e4-455f-bb6f-0a921766042f)]
+[scriptable, uuid(72006d06-a2a5-4250-ae92-04b2f0e2ab8d)]
 interface nsIPrintingPromptService : nsISupports
 {
    /**
    *  This service enables embedders to implement their own Print and Progress Dialogs.
    *  Each platform has a "base" or "basckstop" implementation of the service. The 
    *  service is automatically registered at start up.
    *
    *  Historically, platform toolkits with native dialogs have implemented them in the GFX layer
@@ -33,28 +33,27 @@ interface nsIPrintingPromptService : nsI
    *
    *           Returning NS_OK assumes that the PrintSettings object was correctly filled in and
    *           if it does not have valid fields for printer name, etc. it may also terminate.
    *
    *           Defaults for platform service:           
    *             showPrintDialog       - displays a native dialog
    *             showPageSetup         - displays a XUL dialog
    *             showProgress          - displays a XUL dialog
-   *             showPrinterProperties - n/a
    *
    *           Summary for Windows Embedders:
    *             Stated once again: There is no "fallback" native platform support in GFX for the
    *             displaying of the native print dialog. The current default implementation for Windows
    *             display a native print dialog but a XUL-based progress dialog.
    *             If you wish to have a native progress dialog on Windows you will have to create and 
    *             register your own service.
    *  
    *             Note: The Windows version Mozilla implements this service which is 
    *                   automatically built and registered for you. You can use it as an example.
-   *                   It is located at "mozilla/toolkit/components/printingui/win". That service
+   *                   It is located at "widget/windows/nsPrintDialogService.cpp". That service
    *                   is capable of displaying a native print dialog and a XUL progress dialog.
    *
    *             To fly your own dialog you may:
    *
    *              1) Implement this service to display at least the Print Dialog and a Print Progress Dialog
    *                 or you may implement just one of the dialogs and pass back NS_ERROR_NOT_IMPLEMENTED
    *                 for any of the others.
    *
@@ -68,30 +67,27 @@ interface nsIPrintingPromptService : nsI
    *  Mac: The GFX layer still supports default toolkit behavior for displaying the Print Dialog.
    *       If an embedder implemented service returns NS_ERROR_NOT_IMPLEMENTED for "showPrintDialog"
    *       The toolkit will display the native print dialog.
    *
    *       Defaults for platform service:           
    *       Mac OS9: showPrintDialog       - displays a native dialog
    *                showPageSetup         - displays a native dialog
    *                showProgress          - displays a XUL dialog
-   *                showPrinterProperties - n/a
-   *                
+   *
    *       Mac OSX: showPrintDialog       - displays a native dialog
    *                showPageSetup         - displays a native dialog
    *                showProgress          - not implemented (provided by OS)
-   *                showPrinterProperties - n/a
-   *                
+   *
    *  GTK: There are no native dialog for GTK.
    *
-   *       Defaults for platform service:           
-   *         showPrintDialog       - displays a XUL dialog
-   *         showPageSetup         - displays a XUL dialog
+   *       Defaults for platform service:
+   *         showPrintDialog       - displays a native dialog
+   *         showPageSetup         - displays a native dialog
    *         showProgress          - displays a XUL dialog
-   *         showPrinterProperties - displays a XUL dialog
    *
    */
  
 
 
   /**
    *  Show the Print Dialog 
    *
@@ -136,30 +132,16 @@ interface nsIPrintingPromptService : nsI
    *  @param aObs - An observer to know if the contents of the Print Settings 
    *                object has changed while the dialog is being shown. 
    *                For example, some platforms may implement an "Apply" button (not required)
    */
   void showPageSetup(in mozIDOMWindowProxy parent,
                      in nsIPrintSettings printSettings,
                      in nsIObserver aObs);
 
-  /**
-   *  Sometimes platforms need to bring up a special properties dialog for showing
-   *  print specific properties. Although the PrintSettings has a place to set the 
-   *  printer name, here is is an argument to be clear as to what printer is being
-   *  asked to have the properties set for it. The Printer name in the PS is ignored.
-   *
-   *  @param parent - a DOM windows the dialog will be parented to (required)
-   *  @param printerName - name of printer (required)
-   *  @param printSettings - PrintSettings for page setup (required)
-   */
-  void showPrinterProperties(in mozIDOMWindowProxy parent,
-                             in wstring printerName,
-                             in nsIPrintSettings printSettings);
-
 };
 
 %{C++
 // {260FEDC5-524D-4aa6-9A41-E829F4C78B92}
 #define NS_PRINTINGPROMPTSERVICE_IID \
  {0x260fedc5, 0x524d, 0x4aa6, { 0x9a, 0x41, 0xe8, 0x29, 0xf4, 0xc7, 0x8b, 0x92}}
 %}
 
--- a/toolkit/components/printingui/ipc/nsPrintingProxy.cpp
+++ b/toolkit/components/printingui/ipc/nsPrintingProxy.cpp
@@ -183,24 +183,16 @@ nsPrintingProxy::ShowProgress(mozIDOMWin
 NS_IMETHODIMP
 nsPrintingProxy::ShowPageSetup(mozIDOMWindowProxy *parent,
                                nsIPrintSettings *printSettings,
                                nsIObserver *aObs)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-NS_IMETHODIMP
-nsPrintingProxy::ShowPrinterProperties(mozIDOMWindowProxy *parent,
-                                       const char16_t *printerName,
-                                       nsIPrintSettings *printSettings)
-{
-  return NS_ERROR_NOT_IMPLEMENTED;
-}
-
 nsresult
 nsPrintingProxy::SavePrintSettings(nsIPrintSettings* aPS,
                                    bool aUsePrinterNamePrefix,
                                    uint32_t aFlags)
 {
   nsresult rv;
   nsCOMPtr<nsIPrintSettingsService> printSettingsSvc =
     do_GetService("@mozilla.org/gfx/printsettings-service;1", &rv);
--- a/toolkit/components/printingui/mac/nsPrintingPromptService.cpp
+++ b/toolkit/components/printingui/mac/nsPrintingPromptService.cpp
@@ -67,22 +67,16 @@ nsPrintingPromptService::ShowPageSetup(m
                                            NS_PRINTDIALOGSERVICE_CONTRACTID));
   if (dlgPrint) {
     return dlgPrint->ShowPageSetup(nsPIDOMWindowOuter::From(parent), printSettings);
   }
 
   return NS_ERROR_FAILURE;
 }
 
-NS_IMETHODIMP
-nsPrintingPromptService::ShowPrinterProperties(mozIDOMWindowProxy *parent, const char16_t *printerName, nsIPrintSettings *printSettings)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
 
 //*****************************************************************************
 // nsPrintingPromptService::nsIWebProgressListener
 //*****************************************************************************
 
 NS_IMETHODIMP
 nsPrintingPromptService::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t aStateFlags, nsresult aStatus)
 {
--- a/toolkit/components/printingui/unixshared/nsPrintingPromptService.cpp
+++ b/toolkit/components/printingui/unixshared/nsPrintingPromptService.cpp
@@ -105,25 +105,16 @@ nsPrintingPromptService::ShowPageSetup(m
     if (dlgPrint)
       return dlgPrint->ShowPageSetup(nsPIDOMWindowOuter::From(parent),
                                      printSettings);
 
     return NS_ERROR_FAILURE;
 }
 
 NS_IMETHODIMP
-nsPrintingPromptService::ShowPrinterProperties(mozIDOMWindowProxy *parent,
-                                               const char16_t *printerName,
-                                               nsIPrintSettings *printSettings)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-
-}
-
-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;
--- a/toolkit/components/printingui/win/nsPrintingPromptService.cpp
+++ b/toolkit/components/printingui/win/nsPrintingPromptService.cpp
@@ -111,22 +111,16 @@ nsPrintingPromptService::ShowPageSetup(m
                                              NS_PRINTDIALOGSERVICE_CONTRACTID));
     if (dlgPrint)
       return dlgPrint->ShowPageSetup(nsPIDOMWindowOuter::From(parent),
                                      printSettings);
 
     return NS_ERROR_FAILURE;
 }
 
-NS_IMETHODIMP
-nsPrintingPromptService::ShowPrinterProperties(mozIDOMWindowProxy *parent, const char16_t *printerName, nsIPrintSettings *printSettings)
-{
-    return NS_ERROR_NOT_IMPLEMENTED;
-}
-
 //////////////////////////////////////////////////////////////////////
 // nsIWebProgressListener
 //////////////////////////////////////////////////////////////////////
 
 NS_IMETHODIMP
 nsPrintingPromptService::OnStateChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t aStateFlags, nsresult aStatus)
 {
     if ((aStateFlags & STATE_STOP) && mWebProgressListener)