Index: chrome/renderer/resources/extensions/miscellaneous_bindings.js |
diff --git a/chrome/renderer/resources/extensions/miscellaneous_bindings.js b/chrome/renderer/resources/extensions/miscellaneous_bindings.js |
index d860bab0322f613b8c0455faed2ac4f351367de4..dfcfd3b42fc87d99c32ce769c05249bef917b983 100644 |
--- a/chrome/renderer/resources/extensions/miscellaneous_bindings.js |
+++ b/chrome/renderer/resources/extensions/miscellaneous_bindings.js |
@@ -27,6 +27,7 @@ |
// Note: sendRequest is deprecated. |
chromeHidden.kRequestChannel = "chrome.extension.sendRequest"; |
chromeHidden.kMessageChannel = "chrome.extension.sendMessage"; |
+ chromeHidden.kNativeMessageChannel = "chrome.extension.sendNativeMessage"; |
// Map of port IDs to port object. |
var ports = {}; |
@@ -182,6 +183,10 @@ |
chromeHidden.Port.dispatchOnConnect = function(portId, channelName, tab, |
sourceExtensionId, |
targetExtensionId) { |
+ // Native connections only require one end in JS. |
+ if (targetExtensionId == "native") |
Matt Perry
2012/08/09 02:13:00
This shouldn't happen if you remove the DispatchOn
eaugusti
2012/08/13 23:22:34
Done.
|
+ return true; |
+ |
// Only create a new Port if someone is actually listening for a connection. |
// In addition to being an optimization, this also fixes a bug where if 2 |
// channels were opened to and from the same process, closing one would |