Commit 758d8ebf authored by dvh@chromium.org's avatar dvh@chromium.org

Use window singleton API in the App Developer Tool and simplify the code.

BUG=242989

Review URL: https://chromiumcodereview.appspot.com/15747009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202839 0039d316-1c4b-4281-b951-d872f2087c98
parent 56d3c6e4
...@@ -4,17 +4,12 @@ ...@@ -4,17 +4,12 @@
var mainWindow = null; var mainWindow = null;
chrome.app.runtime.onLaunched.addListener(function() { chrome.app.runtime.onLaunched.addListener(function() {
if (mainWindow && !mainWindow.contentWindow.closed) { chrome.app.window.create('main.html', {
mainWindow.focus(); id: 'apps_devtool',
} else { minHeight: 600,
chrome.app.window.create('main.html', { minWidth: 800,
id: 'apps_debugger', height: 600,
minHeight: 600, width: 800,
minWidth: 800, singleton: true
height: 600, });
width: 800,
}, function(win) {
mainWindow = win;
});
}
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment