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 @@
var mainWindow = null;
chrome.app.runtime.onLaunched.addListener(function() {
if (mainWindow && !mainWindow.contentWindow.closed) {
mainWindow.focus();
} else {
chrome.app.window.create('main.html', {
id: 'apps_debugger',
minHeight: 600,
minWidth: 800,
height: 600,
width: 800,
}, function(win) {
mainWindow = win;
});
}
chrome.app.window.create('main.html', {
id: 'apps_devtool',
minHeight: 600,
minWidth: 800,
height: 600,
width: 800,
singleton: true
});
});
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