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

Side by Side Diff: chrome/common/extensions/api/extension.json

Issue 10818013: Native Messaging! (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "extension", 7 "namespace": "extension",
8 "nocompile": true, 8 "nocompile": true,
9 "dependencies": [ "events", "tabs" ], 9 "dependencies": [ "events", "tabs" ],
10 "types": [ 10 "types": [
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 }, 68 },
69 "optional": true 69 "optional": true
70 } 70 }
71 ], 71 ],
72 "returns": { 72 "returns": {
73 "$ref": "Port", 73 "$ref": "Port",
74 "description": "Port through which messages can be sent and received w ith the extension. The port's <a href='extension.html#type-Port'>onDisconnect</a > event is fired if extension does not exist. " 74 "description": "Port through which messages can be sent and received w ith the extension. The port's <a href='extension.html#type-Port'>onDisconnect</a > event is fired if extension does not exist. "
75 } 75 }
76 }, 76 },
77 { 77 {
78 "name": "connectNative",
79 "type": "function",
80 "description": "Attempts to connect a native app.",
81 "parameters": [
82 {
83 "type": "string",
84 "name": "appName",
85 "description": "The name of the registered app to connect to."
86 },
87 {
88 "name": "connectionMessage",
89 "description": "The object that will be passed to the registered nat ive app on connection.",
90 "type": "object",
91 "additionalProperties": {
92 "type": "any"
93 }
94 }
95 ],
96 "returns": {
97 "$ref": "Port",
98 "description": "Port through which messages can be sent and received w ith the app."
99 }
100 },
101 {
78 "name": "sendRequest", 102 "name": "sendRequest",
79 "nodoc": true, 103 "nodoc": true,
80 "type": "function", 104 "type": "function",
81 "allowAmbiguousOptionalArguments": true, 105 "allowAmbiguousOptionalArguments": true,
82 "unprivileged": true, 106 "unprivileged": true,
83 "description": "Deprecated: Please use sendMessage.", 107 "description": "Deprecated: Please use sendMessage.",
84 "parameters": [ 108 "parameters": [
85 {"type": "string", "name": "extensionId", "optional": true, "descripti on": "The extension ID of the extension you want to connect to. If omitted, defa ult is your own extension."}, 109 {"type": "string", "name": "extensionId", "optional": true, "descripti on": "The extension ID of the extension you want to connect to. If omitted, defa ult is your own extension."},
86 { "type": "any", "name": "request" }, 110 { "type": "any", "name": "request" },
87 { 111 {
(...skipping 27 matching lines...) Expand all
115 { 139 {
116 "name": "response", 140 "name": "response",
117 "type": "any", 141 "type": "any",
118 "description": "The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and <a href='extension.html#property-lastError' >chrome.extension.lastError</a> will be set to the error message." 142 "description": "The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and <a href='extension.html#property-lastError' >chrome.extension.lastError</a> will be set to the error message."
119 } 143 }
120 ] 144 ]
121 } 145 }
122 ] 146 ]
123 }, 147 },
124 { 148 {
149 "name": "sendNativeMessage",
150 "type": "function",
151 "description": "Send a single message to a registered native application .",
152 "parameters": [
153 {
154 "name": "registeredNativeApp",
155 "description": "The name of the registered native app.",
156 "type": "string"
157 },
158 {
159 "name": "message",
160 "description": "The message that will be passed to the registered na tive app.",
161 "type": "object",
162 "additionalProperties": {
163 "type": "any"
164 }
165 },
166 {
167 "type": "function",
168 "name": "callback",
169 "optional": true,
170 "description": "Called with the response from the native app.",
171 "parameters": [
172 {
173 "name": "nativeResponse",
174 "type": "object",
175 "description": "Whatever the native app responds with.",
176 "additionalProperties": {
177 "type": "any"
178 }
179 }
180 ]
181 }
182 ]
183 },
184 {
125 "name": "getURL", 185 "name": "getURL",
126 "type": "function", 186 "type": "function",
127 "unprivileged": true, 187 "unprivileged": true,
128 "description": "Converts a relative path within an extension install dir ectory to a fully-qualified URL.", 188 "description": "Converts a relative path within an extension install dir ectory to a fully-qualified URL.",
129 "parameters": [ 189 "parameters": [
130 { 190 {
131 "type": "string", 191 "type": "string",
132 "name": "path", 192 "name": "path",
133 "description": "A path to a resource within an extension expressed r elative to its install directory." 193 "description": "A path to a resource within an extension expressed r elative to its install directory."
134 } 194 }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 ], 373 ],
314 "returns": { 374 "returns": {
315 "type": "boolean", 375 "type": "boolean",
316 "optional": "true", 376 "optional": "true",
317 "description": "Return true from the event listener if you wish to cal l <code>sendResponse</code> after the event listener returns." 377 "description": "Return true from the event listener if you wish to cal l <code>sendResponse</code> after the event listener returns."
318 } 378 }
319 } 379 }
320 ] 380 ]
321 } 381 }
322 ] 382 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698