Bug 1411121 - Part 3: Remove the nsIPrintingPromptService::showPrinterProperties() r?mconley draft
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Mon, 06 Nov 2017 09:27:05 +0900
changeset 693379 a591b00624192b9471a2be6f385fe8279ff69553
parent 693378 56a77b81c616cb0e6f2b46140030e47180c1f0ae
child 693380 cbc6cdb953660acc4b49ca6a28c083a94f4022a3
push id87770
push userbmo:mantaroh@gmail.com
push dateMon, 06 Nov 2017 00:27:52 +0000
reviewersmconley
bugs1411121
milestone58.0a1
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)