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 cr.define('apps_dev_tool', function() { | 5 cr.define('apps_dev_tool', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * Creates a new list of items. | 9 * Creates a new list of items. |
10 * @param {Object=} opt_propertyBag Optional properties. | 10 * @param {Object=} opt_propertyBag Optional properties. |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 completeList = info.sort(compareByName); | 427 completeList = info.sort(compareByName); |
428 ItemsList.onSearchInput(); | 428 ItemsList.onSearchInput(); |
429 }); | 429 }); |
430 }; | 430 }; |
431 | 431 |
432 /** | 432 /** |
433 * Launches the item with id |id|. | 433 * Launches the item with id |id|. |
434 * @param {string} id Item ID. | 434 * @param {string} id Item ID. |
435 */ | 435 */ |
436 ItemsList.launchApp = function(id) { | 436 ItemsList.launchApp = function(id) { |
437 chrome.management.launchApp(id); | 437 chrome.management.launchApp(id, function() { |
438 ItemsList.loadItemsInfo(); | 438 // There is a delay in generation of background page for the app. |
| 439 setTimeout(ItemsList.loadItemsInfo, 1000); |
| 440 }); |
439 }; | 441 }; |
440 | 442 |
441 return { | 443 return { |
442 ItemsList: ItemsList, | 444 ItemsList: ItemsList, |
443 }; | 445 }; |
444 }); | 446 }); |
OLD | NEW |