Bug 747429 - Make it possible to start a remote debugger only in a new chrome window; r=rcampbell

This commit is contained in:
Victor Porof
2012-05-03 20:36:40 +03:00
parent 27b05585e1
commit 754b6c0456
38 changed files with 366 additions and 128 deletions

View File

@@ -87,6 +87,7 @@ let DebuggerController = {
DebuggerView.StackFrames.initialize();
DebuggerView.Properties.initialize();
DebuggerView.Scripts.initialize();
DebuggerView.showCloseButton(!this._isRemoteDebugger && !this._isChromeDebugger);
this.dispatchEvent("Debugger:Loaded");
this._connect();
@@ -114,7 +115,7 @@ let DebuggerController = {
this.dispatchEvent("Debugger:Unloaded");
this._disconnect();
this._isRemote && this._quitApp();
this._isChromeDebugger && this._quitApp();
},
/**
@@ -122,9 +123,9 @@ let DebuggerController = {
* wiring event handlers as necessary.
*/
_connect: function DC__connect() {
let transport =
this._isRemote ? debuggerSocketConnect(Prefs.remoteHost, Prefs.remotePort)
: DebuggerServer.connectPipe();
let transport = this._isChromeDebugger
? debuggerSocketConnect(Prefs.remoteHost, Prefs.remotePort)
: DebuggerServer.connectPipe();
let client = this.client = new DebuggerClient(transport);
@@ -223,8 +224,16 @@ let DebuggerController = {
* Returns true if this is a remote debugger instance.
* @return boolean
*/
get _isRemote() {
return !window.parent.content;
get _isRemoteDebugger() {
return window._remoteFlag;
},
/**
* Returns true if this is a chrome debugger instance.
* @return boolean
*/
get _isChromeDebugger() {
return !window.parent.content && !this._isRemoteDebugger;
},
/**