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

Unified Diff: chrome/common/extensions/api/extension.json

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/common/extensions/api/extension.json
diff --git a/chrome/common/extensions/api/extension.json b/chrome/common/extensions/api/extension.json
index 9efc4961a2e50b473408adf7be0ce8e3dddbe6a3..c4fdea1a828325267108f817b6b18df5ad270638 100644
--- a/chrome/common/extensions/api/extension.json
+++ b/chrome/common/extensions/api/extension.json
@@ -75,6 +75,31 @@
}
},
{
+ "name": "connectNative",
+ "type": "function",
+ "unprivileged": true,
Aaron Boodman 2012/08/09 18:36:12 "unprivileged" controls whether the api is availab
eaugusti 2012/08/13 23:22:34 Done.
+ "description": "Attempts to connect a native app.",
+ "parameters": [
+ {
+ "type": "string",
+ "name": "appName",
+ "description": "The name of the registered app to connect to."
+ },
+ {
+ "name": "connectionMessage",
+ "description": "The object that will be passed to the registered native app on connection.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "any"
+ }
+ }
+ ],
+ "returns": {
+ "$ref": "Port",
+ "description": "Port through which messages can be sent and received with the app."
+ }
+ },
+ {
"name": "sendRequest",
"nodoc": true,
"type": "function",
@@ -122,6 +147,42 @@
]
},
{
+ "name": "sendNativeMessage",
+ "type": "function",
+ "description": "Send a single message to a registered native application.",
+ "parameters": [
+ {
+ "name": "registeredNativeApp",
+ "description": "The name of the registered native app.",
+ "type": "string"
+ },
+ {
+ "name": "message",
+ "description": "The message that will be passed to the registered native app.",
+ "type": "object",
+ "additionalProperties": {
+ "type": "any"
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "description": "Called with the response from the native app.",
+ "parameters": [
+ {
+ "name": "nativeResponse",
+ "type": "object",
+ "description": "Whatever the native app responds with.",
+ "additionalProperties": {
+ "type": "any"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
"name": "getURL",
"type": "function",
"unprivileged": true,

Powered by Google App Engine
This is Rietveld 408576698