Chromium Code Reviews| Index: chrome/renderer/resources/extensions/app_runtime_custom_bindings.js |
| diff --git a/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js b/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js |
| index 0f3a0f784daa5cc6874c6d2ae5c3b2a72a5fb9d7..62d456ad1c49a42e72a22f75578eeb54f618f192 100644 |
| --- a/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js |
| +++ b/chrome/renderer/resources/extensions/app_runtime_custom_bindings.js |
| @@ -52,8 +52,11 @@ chromeHidden.Event.registerArgumentMassager('app.runtime.onLaunched', |
| function(args, dispatch) { |
| var launchData = args[0]; |
| - if (launchData && typeof launchData.id !== 'undefined') { |
| - // new-style dispatch. |
| + if (launchData && |
| + typeof launchData.id !== 'undefined' && |
| + typeof launchData.items !== 'undefined') { |
| + // An onLaunched corresponding to file_handlers in the app's manifest. |
| + // NOTE: Using the new-style dispatch. |
| var items = [] |
| var numItems = launchData.items.length; |
| var itemLoaded = function(err, item) { |
| @@ -79,6 +82,13 @@ chromeHidden.Event.registerArgumentMassager('app.runtime.onLaunched', |
| itemLoaded(fileError); |
| }); |
| }); |
| + } else if (launchData && |
| + typeof launchData.id !== 'undefined' && |
| + typeof launchData.url !== 'undefined' && |
| + typeof launchData.referringUrl !== 'undefined') { |
| + // An onLaunched corresponding to url_handlers in the app's manifest. |
| + // Handle explicitly even though handling coincides with the generic case. |
| + dispatch([launchData]); |
|
not at google - send to devlin
2013/08/19 23:32:24
Enumerating the various types of launches doesn't
sergeygs
2013/08/29 08:24:42
Done.
|
| } else if (launchData) { |
| dispatch([launchData]); |
| } else { |