Commit 85c590de authored by Jonathan Watt's avatar Jonathan Watt
Browse files

Bug 1551333. Rename nsIPrintingPromptService methods to make them more searchable. r=bobowen

Differential Revision: https://phabricator.services.mozilla.com/D30996

--HG--
extra : rebase_source : dc747a24f01c75d3378fed46bb49bf7dadd5f3df
extra : amend_source : c7dcf55fe7010c31f0e857cdd3c17d28622f289f
parent 206ddbe9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1232,7 +1232,7 @@ void nsPrintJob::ShowPrintProgress(bool aIsForPrinting, bool& aDoNotify) {
      nsCOMPtr<nsIWebProgressListener> printProgressListener;

      nsCOMPtr<nsIWebBrowserPrint> wbp(do_QueryInterface(mDocViewerPrint));
      nsresult rv = printPromptService->ShowProgress(
      nsresult rv = printPromptService->ShowPrintProgressDialog(
          domWin, wbp, printData->mPrintSettings, this, aIsForPrinting,
          getter_AddRefs(printProgressListener),
          getter_AddRefs(printData->mPrintProgressParams), &aDoNotify);
+20 −25
Original line number Diff line number Diff line
@@ -36,8 +36,8 @@ interface nsIPrintingPromptService : nsISupports
   *
   *           Defaults for platform service:           
   *             showPrintDialog           - displays a native dialog
   *             showPageSetup         - displays a XUL dialog
   *             showProgress          - displays a XUL dialog
   *             showPrintProgressDialog   - displays a XUL dialog
   *             showPageSetupDialog       - displays a XUL dialog
   *
   *           Summary for Windows Embedders:
   *             Stated once again: There is no "fallback" native platform support in GFX for the
@@ -68,21 +68,16 @@ interface nsIPrintingPromptService : nsISupports
   *       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
   *
   *       Mac OSX: showPrintDialog           - displays a native dialog
   *                showPageSetup         - displays a native dialog
   *                showProgress          - not implemented (provided by OS)
   *                showPrintProgressDialog   - not implemented (provided by OS)
   *                showPageSetupDialog       - displays a native dialog
   *
   *  GTK: There are no native dialog for GTK.
   *
   *       Defaults for platform service:
   *         showPrintDialog           - displays a native dialog
   *         showPageSetup         - displays a native dialog
   *         showProgress          - displays a XUL dialog
   *         showPrintProgressDialog   - displays a XUL dialog
   *         showPageSetupDialog       - displays a native dialog
   *
   */
 
@@ -115,7 +110,7 @@ interface nsIPrintingPromptService : nsISupports
   *                        (usually the caller) shouldn't wait
   *                        For Print Preview Progress there is intermediate progress
   */
  void showProgress(in mozIDOMWindowProxy parent,
  void showPrintProgressDialog(in mozIDOMWindowProxy parent,
                               in nsIWebBrowserPrint webBrowserPrint,
                               in nsIPrintSettings printSettings,
                               in nsIObserver openDialogObserver,
@@ -125,12 +120,12 @@ interface nsIPrintingPromptService : nsISupports
                               out boolean notifyOnOpen);

  /**
   *  Shows the print progress dialog
   *  Shows the print page setup dialog
   *
   *  @param parent - a DOM windows the dialog will be parented to (required)
   *  @param printSettings - PrintSettings for page setup (required)
   */
  void showPageSetup(in mozIDOMWindowProxy parent,
  void showPageSetupDialog(in mozIDOMWindowProxy parent,
                           in nsIPrintSettings printSettings);

};
+4 −4
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ var PrintUtils = {
      var printSettings = this.getPrintSettings();
      var PRINTPROMPTSVC = Cc["@mozilla.org/embedcomp/printingprompt-service;1"]
                             .getService(Ci.nsIPrintingPromptService);
      PRINTPROMPTSVC.showPageSetup(window, printSettings, null);
      PRINTPROMPTSVC.showPageSetupDialog(window, printSettings, null);
      if (gSavePrintSettings) {
        // Page Setup data is a "native" setting on the Mac
        var PSSVC = Cc["@mozilla.org/gfx/printsettings-service;1"]
@@ -217,7 +217,7 @@ var PrintUtils = {
    // just in case we are already printing,
    // an error code could be returned if the Progress Dialog is already displayed
    try {
      PPROMPTSVC.showProgress(window, null, printSettings, this._obsPP, false,
      PPROMPTSVC.showPrintProgressDialog(window, null, printSettings, this._obsPP, false,
                                         this._webProgressPP, ppParams, notifyOnOpen);
      if (ppParams.value) {
        ppParams.value.docTitle = this._originalTitle;
@@ -424,7 +424,7 @@ var PrintUtils = {
  enterPrintPreview() {
    // Send a message to the print preview browser to initialize
    // print preview. If we happen to have gotten a print preview
    // progress listener from nsIPrintingPromptService.showProgress
    // progress listener from nsIPrintingPromptService.showPrintProgressDialog
    // in printPreview, we add listeners to feed that progress
    // listener.
    let ppBrowser = this._shouldSimplify ?
+4 −3
Original line number Diff line number Diff line
@@ -47,7 +47,8 @@ mozilla::ipc::IPCResult PrintingParent::RecvShowProgress(

  nsresult rv = NS_ERROR_INVALID_ARG;
  if (parentWin && pps) {
    rv = pps->ShowProgress(parentWin, nullptr, nullptr, observer, isForPrinting,
    rv = pps->ShowPrintProgressDialog(
        parentWin, nullptr, nullptr, observer, isForPrinting,
        getter_AddRefs(printProgressListener),
        getter_AddRefs(printProgressParams), &notifyOnOpen);
  }
+3 −3
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ nsPrintingProxy::ShowPrintDialog(mozIDOMWindowProxy* parent,
}

NS_IMETHODIMP
nsPrintingProxy::ShowProgress(
nsPrintingProxy::ShowPrintProgressDialog(
    mozIDOMWindowProxy* parent,
    nsIWebBrowserPrint* webBrowserPrint,  // ok to be null
    nsIPrintSettings* printSettings,      // ok to be null
@@ -176,7 +176,7 @@ nsPrintingProxy::ShowProgress(
}

NS_IMETHODIMP
nsPrintingProxy::ShowPageSetup(mozIDOMWindowProxy* parent,
nsPrintingProxy::ShowPageSetupDialog(mozIDOMWindowProxy* parent,
                                     nsIPrintSettings* printSettings) {
  return NS_ERROR_NOT_IMPLEMENTED;
}
Loading