Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4721)

Unified Diff: chrome/renderer/resources/extensions/miscellaneous_bindings.js

Issue 10818013: Native Messaging! (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Everything is Different! Merged with MessageService Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698