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

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

Issue 11968028: Remove connect message from Native Messaging API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/runtime_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/runtime_custom_bindings.js b/chrome/renderer/resources/extensions/runtime_custom_bindings.js
index c5e63ac1fa50aad9a6a1d5149e145a8353bdb33a..d0bbdafddb38aa865ec14cf95559f623d8588b55 100644
--- a/chrome/renderer/resources/extensions/runtime_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/runtime_custom_bindings.js
@@ -48,8 +48,8 @@ chromeHidden.registerCustomHook('runtime', function(bindings, id, contextType) {
apiFunctions.setHandleRequest('sendNativeMessage',
function(targetId, message, responseCallback) {
var port = chrome.runtime.connectNative(
- targetId, message, chromeHidden.kNativeMessageChannel);
- chromeHidden.Port.sendMessageImpl(port, '', responseCallback);
+ targetId, chromeHidden.kNativeMessageChannel);
+ chromeHidden.Port.sendMessageImpl(port, message, responseCallback);
});
apiFunctions.setUpdateArgumentsPreValidate('connect', function() {
@@ -117,8 +117,7 @@ chromeHidden.registerCustomHook('runtime', function(bindings, id, contextType) {
// Turn the object into a string here, because it eventually will be.
var portId = OpenChannelToNativeApp(chrome.runtime.id,
nativeAppName,
- connectInfo.name,
- JSON.stringify(connectInfo.message));
+ connectInfo.name);
if (portId >= 0) {
return chromeHidden.Port.createPort(portId, connectInfo.name);
}

Powered by Google App Engine
This is Rietveld 408576698