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

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: 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 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 "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.
81 "description": "Attempts to connect a native app.",
82 "parameters": [
83 {
84 "type": "string",
85 "name": "appName",
86 "description": "The name of the registered app to connect to."
87 },
88 {
89 "name": "connectionMessage",
90 "description": "The object that will be passed to the registered nat ive app on connection.",
91 "type": "object",
92 "additionalProperties": {
93 "type": "any"
94 }
95 }
96 ],
97 "returns": {
98 "$ref": "Port",
99 "description": "Port through which messages can be sent and received w ith the app."
100 }
101 },
102 {
78 "name": "sendRequest", 103 "name": "sendRequest",
79 "nodoc": true, 104 "nodoc": true,
80 "type": "function", 105 "type": "function",
81 "allowAmbiguousOptionalArguments": true, 106 "allowAmbiguousOptionalArguments": true,
82 "unprivileged": true, 107 "unprivileged": true,
83 "description": "Deprecated: Please use sendMessage.", 108 "description": "Deprecated: Please use sendMessage.",
84 "parameters": [ 109 "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."}, 110 {"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" }, 111 { "type": "any", "name": "request" },
87 { 112 {
(...skipping 27 matching lines...) Expand all
115 { 140 {
116 "name": "response", 141 "name": "response",
117 "type": "any", 142 "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." 143 "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 } 144 }
120 ] 145 ]
121 } 146 }
122 ] 147 ]
123 }, 148 },
124 { 149 {
150 "name": "sendNativeMessage",
151 "type": "function",
152 "description": "Send a single message to a registered native application .",
153 "parameters": [
154 {
155 "name": "registeredNativeApp",
156 "description": "The name of the registered native app.",
157 "type": "string"
158 },
159 {
160 "name": "message",
161 "description": "The message that will be passed to the registered na tive app.",
162 "type": "object",
163 "additionalProperties": {
164 "type": "any"
165 }
166 },
167 {
168 "type": "function",
169 "name": "callback",
170 "optional": true,
171 "description": "Called with the response from the native app.",
172 "parameters": [
173 {
174 "name": "nativeResponse",
175 "type": "object",
176 "description": "Whatever the native app responds with.",
177 "additionalProperties": {
178 "type": "any"
179 }
180 }
181 ]
182 }
183 ]
184 },
185 {
125 "name": "getURL", 186 "name": "getURL",
126 "type": "function", 187 "type": "function",
127 "unprivileged": true, 188 "unprivileged": true,
128 "description": "Converts a relative path within an extension install dir ectory to a fully-qualified URL.", 189 "description": "Converts a relative path within an extension install dir ectory to a fully-qualified URL.",
129 "parameters": [ 190 "parameters": [
130 { 191 {
131 "type": "string", 192 "type": "string",
132 "name": "path", 193 "name": "path",
133 "description": "A path to a resource within an extension expressed r elative to its install directory." 194 "description": "A path to a resource within an extension expressed r elative to its install directory."
134 } 195 }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 ], 374 ],
314 "returns": { 375 "returns": {
315 "type": "boolean", 376 "type": "boolean",
316 "optional": "true", 377 "optional": "true",
317 "description": "Return true from the event listener if you wish to cal l <code>sendResponse</code> after the event listener returns." 378 "description": "Return true from the event listener if you wish to cal l <code>sendResponse</code> after the event listener returns."
318 } 379 }
319 } 380 }
320 ] 381 ]
321 } 382 }
322 ] 383 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698