| Index: trunk/src/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js
|
| ===================================================================
|
| --- trunk/src/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js (revision 222256)
|
| +++ trunk/src/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js (working copy)
|
| @@ -19,15 +19,8 @@
|
| function(args, dispatch) {
|
| var launchData = args[0];
|
|
|
| - if (!launchData) {
|
| - // An onLaunched corresponding to launching directly or from
|
| - // the app launcher or browser.
|
| - dispatch([]);
|
| - return;
|
| - }
|
| -
|
| - if (launchData.items) {
|
| - // An onLaunched corresponding to file_handlers in the app's manifest.
|
| + if (launchData && typeof launchData.id !== 'undefined') {
|
| + // new-style dispatch.
|
| var items = []
|
| var numItems = launchData.items.length;
|
| var itemLoaded = function(err, item) {
|
| @@ -54,10 +47,10 @@
|
| itemLoaded(fileError);
|
| });
|
| });
|
| - } else {
|
| - // Default case. This currently covers an onLaunched corresponding to
|
| - // url_handlers in the app's manifest.
|
| + } else if (launchData) {
|
| dispatch([launchData]);
|
| + } else {
|
| + dispatch([]);
|
| }
|
| });
|
|
|
|
|