Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #5997 from adobe/jasonsanjose/revert-mac-chrome-sp…
Browse files Browse the repository at this point in the history
…rint34

Revert changes to Chrome live preview on mac for sprint 34
  • Loading branch information
redmunds committed Nov 14, 2013
2 parents e6f23f0 + 96948d9 commit 30eccd5
Showing 1 changed file with 4 additions and 25 deletions.
29 changes: 4 additions & 25 deletions src/LiveDevelopment/LiveDevelopment.js
Original file line number Diff line number Diff line change
Expand Up @@ -798,19 +798,8 @@ define(function LiveDevelopment(require, exports, module) {
* the status accordingly.
*/
function cleanup() {
// Need to do this in order to trigger the corresponding CloseLiveBrowser cleanups required on
// the native Mac side
var closeDeferred = (brackets.platform === "mac") ? NativeApp.closeLiveBrowser() : $.Deferred().resolve();
closeDeferred.done(function () {
_setStatus(STATUS_INACTIVE, reason || "explicit_close");
deferred.resolve();
}).fail(function (err) {
if (err) {
reason += " (" + err + ")";
}
_setStatus(STATUS_INACTIVE, reason || "explicit_close");
deferred.resolve();
});
_setStatus(STATUS_INACTIVE, reason || "explicit_close");
deferred.resolve();
}

if (_openDeferred) {
Expand Down Expand Up @@ -1044,7 +1033,7 @@ define(function LiveDevelopment(require, exports, module) {
if (id === Dialogs.DIALOG_BTN_OK) {
// User has chosen to reload Chrome, quit the running instance
_setStatus(STATUS_INACTIVE);
_close()
NativeApp.closeLiveBrowser()
.done(function () {
browserStarted = false;
window.setTimeout(function () {
Expand All @@ -1059,17 +1048,7 @@ define(function LiveDevelopment(require, exports, module) {
_openDeferred.reject("CLOSE_LIVE_BROWSER");
});
} else {
_close()
.done(function () {
browserStarted = false;
_openDeferred.reject("CANCEL");
})
.fail(function (err) {
// Report error?
_setStatus(STATUS_ERROR);
browserStarted = false;
_openDeferred.reject("CLOSE_LIVE_BROWSER");
});
_openDeferred.reject("CANCEL");
}
});

Expand Down

0 comments on commit 30eccd5

Please sign in to comment.