OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 var mainWindow = null; | 5 var mainWindow = null; |
6 chrome.app.runtime.onLaunched.addListener(function() { | 6 chrome.app.runtime.onLaunched.addListener(function() { |
7 if (mainWindow && !mainWindow.contentWindow.closed) { | 7 chrome.app.window.create('main.html', { |
8 mainWindow.focus(); | 8 id: 'apps_devtool', |
9 } else { | 9 minHeight: 600, |
10 chrome.app.window.create('main.html', { | 10 minWidth: 800, |
11 id: 'apps_debugger', | 11 height: 600, |
12 minHeight: 600, | 12 width: 800, |
13 minWidth: 800, | 13 singleton: true |
14 height: 600, | 14 }); |
15 width: 800, | |
16 }, function(win) { | |
17 mainWindow = win; | |
18 }); | |
19 } | |
20 }); | 15 }); |
OLD | NEW |