Bug 1387802 - Remove [deprecated] methods from nsITaskbarPreviewController. r=jimm
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Sun, 06 Aug 2017 13:35:02 +0900
changeset 373253 87b6163f38794046591bb5265f8f31cefbef7d3d
parent 373252 4ab074dafa75146eea766812d2bf6b6b68f8ca0b
child 373254 2621f3f5d3aa00893e8e2b11c6593a1d42f34e82
push id32298
push usercbook@mozilla.com
push dateTue, 08 Aug 2017 11:16:07 +0000
treeherdermozilla-central@8c7788eda00e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1387802
milestone57.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 1387802 - Remove [deprecated] methods from nsITaskbarPreviewController. r=jimm MozReview-Commit-ID: 25cdKHqVLSh
widget/nsITaskbarPreviewController.idl
widget/nsITaskbarWindowPreview.idl
widget/tests/taskbar_previews.xul
widget/windows/WinTaskbar.cpp
--- a/widget/nsITaskbarPreviewController.idl
+++ b/widget/nsITaskbarPreviewController.idl
@@ -32,52 +32,43 @@ interface nsITaskbarPreviewCallback : ns
  * the interface the controller is attached to, only certain methods/attributes
  * are required to be implemented.
  */
 [scriptable, uuid(8b427646-e446-4941-ae0b-c1122a173a68)]
 interface nsITaskbarPreviewController : nsISupports
 {
   /**
    * The width of the preview image. This value is allowed to change at any
-   * time. See drawPreview for more information.
+   * time. See requestPreview for more information.
    */
   readonly attribute unsigned long width;
 
   /**
    * The height of the preview image. This value is allowed to change at any
-   * time.  See drawPreview for more information.
+   * time.  See requestPreview for more information.
    */
   readonly attribute unsigned long height;
 
   /**
    * The aspect ratio of the thumbnail - this does not need to match the ratio
    * of the preview. This value is allowed to change at any time. See
-   * drawThumbnail for more information.
+   * requestThumbnail for more information.
    */
   readonly attribute float thumbnailAspectRatio;
 
-  [deprecated]
-  boolean drawPreview(in nsISupports ctx);
-
-  [deprecated]
-  boolean drawThumbnail(in nsISupports ctx, in unsigned long width, in unsigned long height);
-
   /**
    * Invoked by nsITaskbarPreview when it needs to render the preview.
    *
    * @param aCallback Async callback the controller should invoke once
    * the thumbnail is rendered. aCallback receives as its only parameter
    * a canvas containing the preview image.
    */
   void requestPreview(in nsITaskbarPreviewCallback aCallback);
 
   /**
-   * An asynchronous version of drawPreview and drawThumbnail apis
-   * implemented in nsITaskbarPreviewController.
-   *
    * Note: it is guaranteed that width/height == thumbnailAspectRatio
    * (modulo rounding errors)
    *
    * Also note that the context is not attached to a canvas element.
    *
    * @param aCallback Async callback the controller should invoke once
    * the thumbnail is rendered. aCallback receives as its only parameter
    * a canvas containing the thumbnail image. Canvas dimensions should
--- a/widget/nsITaskbarWindowPreview.idl
+++ b/widget/nsITaskbarWindowPreview.idl
@@ -15,18 +15,18 @@ interface nsITaskbarPreviewButton;
  * default, Windows implements much of the behavior for applications by
  * default. The primary purpose of this interface is to allow Gecko
  * applications to take control over parts of the preview. Some parts are not
  * controlled through this interface: the title and icon of the preview match
  * the title and icon of the window always.
  *
  * By default, Windows takes care of drawing the thumbnail and preview for the
  * application however if enableCustomDrawing is set to true, then the
- * controller will start to receive drawPreview and drawThumbnail calls as well
- * as reads on the thumbnailAspectRatio, width and height properties.
+ * controller will start to receive requestPreview and requestThumbnail calls
+ * as well as reads on the thumbnailAspectRatio, width and height properties.
  *
  * By default, nsITaskbarWindowPreviews are visible. When made invisible, the
  * window disappears from the list of windows in the taskbar for the
  * application.
  *
  * If the window has any visible nsITaskbarTabPreviews, then the
  * nsITaskbarWindowPreview for the corresponding window is automatically
  * hidden. This is not reflected in the visible property. Note that other parts
--- a/widget/tests/taskbar_previews.xul
+++ b/widget/tests/taskbar_previews.xul
@@ -45,18 +45,16 @@
     function loaded()
     {
       if (!taskbar.available)
         SimpleTest.finish();
       let controller = {
         width: 400,
         height: 400,
         thumbnailAspectRatio: 1.0,
-        drawThumbnail: function () { return false; },
-        drawPreview: function () { return false; },
         get wrappedJSObject() { return this; }
       }
       // HACK from mconnor:
       var wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
       let win = wm.getMostRecentWindow("navigator:browser");
       let docShell = win.gBrowser.docShell;
 
       let winPreview = taskbar.getTaskbarWindowPreview(docShell);
--- a/widget/windows/WinTaskbar.cpp
+++ b/widget/windows/WinTaskbar.cpp
@@ -138,30 +138,16 @@ DefaultController::GetThumbnailAspectRat
   GetHeight(&height);
   if (!height)
     height = 1;
 
   *aThumbnailAspectRatio = width/float(height);
   return NS_OK;
 }
 
-// deprecated
-NS_IMETHODIMP
-DefaultController::DrawPreview(nsISupports *ctx, bool *rDrawFrame) {
-  *rDrawFrame = true;
-  return NS_ERROR_UNEXPECTED;
-}
-
-// deprecated
-NS_IMETHODIMP
-DefaultController::DrawThumbnail(nsISupports *ctx, uint32_t width, uint32_t height, bool *rDrawFrame) {
-  *rDrawFrame = false;
-  return NS_ERROR_UNEXPECTED;
-}
-
 NS_IMETHODIMP
 DefaultController::RequestThumbnail(nsITaskbarPreviewCallback *aCallback, uint32_t width, uint32_t height) {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 DefaultController::RequestPreview(nsITaskbarPreviewCallback *aCallback) {
   return NS_OK;