Bug 1409971 - Part 1. Add cancelling print job interface to PPrintProgressDialog. r=mconley
authorMantaroh Yoshinaga <mantaroh@gmail.com>
Wed, 15 Nov 2017 16:29:45 +0900
changeset 392379 983d715192fefc0fc34fa894ba2d03cd3d17c584
parent 392378 cf293d03758a7df936205f9a2bbcaafad43853fb
child 392380 154ec3c19c88655ffdf1d1684d61de19f1d57bea
push id55546
push usermantaroh@gmail.com
push dateFri, 17 Nov 2017 12:29:49 +0000
treeherderautoland@b78cea997533 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1409971
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 1409971 - Part 1. Add cancelling print job interface to PPrintProgressDialog. r=mconley This patch will add empty ipc interface in order to notify cancelling print job. MozReview-Commit-ID: KqBN5A4ARSd
toolkit/components/printingui/ipc/PPrintProgressDialog.ipdl
toolkit/components/printingui/ipc/PrintProgressDialogChild.cpp
toolkit/components/printingui/ipc/PrintProgressDialogChild.h
--- a/toolkit/components/printingui/ipc/PPrintProgressDialog.ipdl
+++ b/toolkit/components/printingui/ipc/PPrintProgressDialog.ipdl
@@ -24,12 +24,13 @@ parent:
   async DocTitleChange(nsString newTitle);
 
   async DocURLChange(nsString newURL);
 
   async __delete__();
 
 child:
   async DialogOpened();
+  async CancelledCurrentJob();
 };
 
 } // namespace embedding
 } // namespace mozilla
--- a/toolkit/components/printingui/ipc/PrintProgressDialogChild.cpp
+++ b/toolkit/components/printingui/ipc/PrintProgressDialogChild.cpp
@@ -38,16 +38,22 @@ PrintProgressDialogChild::RecvDialogOpen
 {
   // nsPrintEngine's observer, which we're reporting to here, doesn't care
   // what gets passed as the subject, topic or data, so we'll just send
   // nullptrs.
   mOpenObserver->Observe(nullptr, nullptr, nullptr);
   return IPC_OK();
 }
 
+mozilla::ipc::IPCResult
+PrintProgressDialogChild::RecvCancelledCurrentJob()
+{
+  return IPC_OK();
+}
+
 // nsIWebProgressListener
 
 NS_IMETHODIMP
 PrintProgressDialogChild::OnStateChange(nsIWebProgress* aProgress,
                                         nsIRequest* aRequest,
                                         uint32_t aStateFlags,
                                         nsresult aStatus)
 {
--- a/toolkit/components/printingui/ipc/PrintProgressDialogChild.h
+++ b/toolkit/components/printingui/ipc/PrintProgressDialogChild.h
@@ -22,16 +22,18 @@ class PrintProgressDialogChild final : p
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPRINTPROGRESSPARAMS
 
 public:
   MOZ_IMPLICIT PrintProgressDialogChild(nsIObserver* aOpenObserver);
 
   virtual mozilla::ipc::IPCResult RecvDialogOpened() override;
 
+  virtual mozilla::ipc::IPCResult RecvCancelledCurrentJob() override;
+
 private:
   virtual ~PrintProgressDialogChild();
   nsCOMPtr<nsIObserver> mOpenObserver;
   nsString mDocTitle;
   nsString mDocURL;
 };
 
 } // namespace embedding