Skip to content

Commit

Permalink
atopwi side of clean up for extension panels
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjbarton committed Apr 12, 2012
1 parent 372707f commit 296f252
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
Empty file added .allow-devtools-save
Empty file.
13 changes: 8 additions & 5 deletions DevtoolsConnection.js
Expand Up @@ -14,8 +14,8 @@ function(appendFrame) {
openInspector: function(debuggee) { openInspector: function(debuggee) {
this.debuggee = debuggee; this.debuggee = debuggee;


var inspectorElt = this.showInspectorIframe(); this.listenDebuggee();
this.listenDebuggee(inspectorElt.contentWindow); this.showInspectorIframe();
}, },


showInspectorIframe: function() { showInspectorIframe: function() {
Expand All @@ -26,14 +26,17 @@ function(appendFrame) {
}, },


listenDebuggee: function() { listenDebuggee: function() {
this.devtools = new RESTChannel.Connection(); if (debug) {
console.log("DevtoolsConnection listening ");
}
this.onUnload = RESTChannel.listen( this.onUnload = RESTChannel.listen(
this.devtools, window,
this.sendDebuggeeSpec.bind(this) this.sendDebuggeeSpec.bind(this)
); );
}, },


sendDebuggeeSpec: function() { sendDebuggeeSpec: function(connection) {
this.devtools = connection;
this.devtools.putObject( this.devtools.putObject(
'debuggee', 'debuggee',
this.debuggee, this.debuggee,
Expand Down
7 changes: 4 additions & 3 deletions devtoolsAdapter/extend.html
@@ -1,10 +1,11 @@
<html><head> <html><head>
<script src='../inspector/front-end/ExtensionAPI.js'></script> <script src='../inspector/front-end/ExtensionAPI.js'></script>
<script src='../inspector/front-end/ExtensionAPI.js'></script>
<script src='../../RESTChannel/RESTChannel.js'></script> <script src='../../RESTChannel/RESTChannel.js'></script>
<script src='../APIGeneration/trialAPI.js'></script>
<script src='../devtoolsAdapter/extensionPanelRuntime.js'></script>
<script> <script>
// This code is loaded by 'options' settings in Sirius
// It loads into devtools.html as a devtools extension.


chrome.devtools = injectedExtensionAPI('log'); chrome.devtools = injectedExtensionAPI('log');
chrome.devtools.panels.create("Log", '', '../Purple/devtools/panels/log.html', function() { chrome.devtools.panels.create("Log", '', '../Purple/devtools/panels/log.html', function() {
console.log('extend.html PANEL callback'); console.log('extend.html PANEL callback');
Expand Down

0 comments on commit 296f252

Please sign in to comment.