Bug 1214514 - Repair screenshot menu item. r=ednapiranha
authorJ. Ryan Stinnett <jryans@gmail.com>
Thu, 22 Oct 2015 17:13:27 -0500
changeset 304254 afd47100fac370831bdf9ae0809f02b96389dbd8
parent 304253 ddb5b8e191c9e6cd1f8f1b6c7524eab20747a402
child 304255 b17cd99e9b4e8ce762db86de9d653c2038ab7c32
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersednapiranha
bugs1214514
milestone44.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 1214514 - Repair screenshot menu item. r=ednapiranha
devtools/client/webide/content/webide.js
devtools/client/webide/modules/runtime-list.js
--- a/devtools/client/webide/content/webide.js
+++ b/devtools/client/webide/content/webide.js
@@ -1033,16 +1033,26 @@ var Cmds = {
   disconnectRuntime: function() {
     let disconnecting = Task.spawn(function*() {
       yield UI.destroyToolbox();
       yield AppManager.disconnectRuntime();
     });
     return UI.busyUntil(disconnecting, "disconnecting from runtime");
   },
 
+  takeScreenshot: function() {
+    let url = AppManager.deviceFront.screenshotToDataURL();
+    return UI.busyUntil(url.then(longstr => {
+      return longstr.string().then(dataURL => {
+        longstr.release().then(null, console.error);
+        UI.openInBrowser(dataURL);
+      });
+    }), "taking screenshot");
+  },
+
   showPermissionsTable: function() {
     UI.selectDeckPanel("permissionstable");
   },
 
   showRuntimeDetails: function() {
     UI.selectDeckPanel("runtimedetails");
   },
 
--- a/devtools/client/webide/modules/runtime-list.js
+++ b/devtools/client/webide/modules/runtime-list.js
@@ -55,22 +55,17 @@ RuntimeList.prototype = {
 
   onWebIDEUpdate: function(event, what, details) {
     if (what == "busy" || what == "unbusy") {
       this.updateCommands();
     }
   },
 
   takeScreenshot: function() {
-    return this._UI.busyUntil(AppManager.deviceFront.screenshotToDataURL().then(longstr => {
-       return longstr.string().then(dataURL => {
-         longstr.release().then(null, console.error);
-         this._UI.openInBrowser(dataURL);
-       });
-    }), "taking screenshot");
+    this._Cmds.takeScreenshot();
   },
 
   showRuntimeDetails: function() {
     this._Cmds.showRuntimeDetails();
   },
 
   showPermissionsTable: function() {
     this._Cmds.showPermissionsTable();