Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 appId = 'hotword_audio_verification_app'; | |
| 6 | |
| 5 chrome.app.runtime.onLaunched.addListener(function() { | 7 chrome.app.runtime.onLaunched.addListener(function() { |
| 6 // TODO(kcarattini): Check if the app is already running. If so, bring it | 8 // TODO(kcarattini): Remove this when crbug/426725 is fixed. |
|
benwells
2014/10/24 04:34:17
I am guessing the window isn't shown as you've got
kcarattini
2014/10/25 02:54:26
Confirmed that the window isn't focused due to the
| |
| 7 // to focus rather than creating a new window. | 9 var appWindow = chrome.app.window.get(appId); |
| 10 if (appWindow) { | |
| 11 appWindow.focus(); | |
| 12 return; | |
| 13 } | |
| 8 | 14 |
| 9 // TODO(kcarattini): Don't show the window until the launch mode has been | |
| 10 // established. | |
| 11 chrome.app.window.create('main.html', { | 15 chrome.app.window.create('main.html', { |
| 12 'frame': 'none', | 16 'frame': 'none', |
| 13 'resizable': false, | 17 'resizable': false, |
| 18 'hidden': true, | |
| 19 'id': appId, | |
| 14 'bounds': { | 20 'bounds': { |
| 15 'width': 800, | 21 'width': 800, |
| 16 'height': 600 | 22 'height': 600 |
| 17 } | 23 } |
| 18 }); | 24 }); |
| 19 }); | 25 }); |
| OLD | NEW |