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

Side by Side Diff: chrome/common/extensions/docs/templates/articles/nativeMessaging.html

Issue 2272513002: Documentation: Clarify that runtime.sendMessage does not notify itself (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | extensions/common/api/runtime.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <h1>Native Messaging</h1> 1 <h1>Native Messaging</h1>
2 <p> 2 <p>
3 Extensions and apps can exchange messages with native applications using an API 3 Extensions and apps can exchange messages with native applications using an API
4 that is similar to the other <a href="messaging">message passing APIs</a>. 4 that is similar to the other <a href="messaging">message passing APIs</a>.
5 Native applications that support this feature must register a 5 Native applications that support this feature must register a
6 <em>native messaging host</em> that knows how to communicate with the extension. 6 <em>native messaging host</em> that knows how to communicate with the extension.
7 Chrome starts the host in a separate process and communicates with it using 7 Chrome starts the host in a separate process and communicates with it using
8 standard input and standard output streams. 8 standard input and standard output streams.
9 9
10 <h2 id="native-messaging-host">Native messaging host</h2> 10 <h2 id="native-messaging-host">Native messaging host</h2>
(...skipping 28 matching lines...) Expand all
39 and dots. The name cannot start or end with a dot, and a dot cannot be 39 and dots. The name cannot start or end with a dot, and a dot cannot be
40 followed by another dot. 40 followed by another dot.
41 </td> 41 </td>
42 </tr> 42 </tr>
43 <tr> 43 <tr>
44 <td><code>description</code></td> 44 <td><code>description</code></td>
45 <td>Short application description.</td> 45 <td>Short application description.</td>
46 </tr> 46 </tr>
47 <tr> 47 <tr>
48 <td><code>path</code></td> 48 <td><code>path</code></td>
49 <td>Path to the native messaging host binary. On Linux and OSX the path must 49 <td>Path to the native messaging host binary. On Windows the path must be
50 be absolute. On Windows it can be relative to the directory in which the 50 absolute, on Linux and OSX the path can be absolute or relative to the
Devlin 2016/08/23 16:30:34 I don't think this is right - it looks like we do
robwu 2016/08/24 06:49:42 You're right, fixed!
51 directory in which the
51 manifest file is located. The host process is started with the current 52 manifest file is located. The host process is started with the current
52 directory set to the directory that contains the host binary. For example if 53 directory set to the directory that contains the host binary. For example if
53 this parameter is set to <code>C:\Application\nm_host.exe</code> then it 54 this parameter is set to <code>C:\Application\nm_host.exe</code> then it
54 will be started with current directory <code>C:\Application\</code>.</td> 55 will be started with current directory <code>C:\Application\</code>.</td>
55 </tr> 56 </tr>
56 <tr> 57 <tr>
57 <td><code>type</code></td> 58 <td><code>type</code></td>
58 <td>Type of the interface used to communicate with the native messaging 59 <td>Type of the interface used to communicate with the native messaging
59 host. Currently there is only one possible value for this parameter: 60 host. Currently there is only one possible value for this parameter:
60 <code>stdio</code>. It indicates that Chrome should use <code>stdin</code> 61 <code>stdio</code>. It indicates that Chrome should use <code>stdin</code>
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 Is the name spelled correctly in the extension and in the manifest file? 215 Is the name spelled correctly in the extension and in the manifest file?
215 <li> 216 <li>
216 Is the manifest put in the right directory and with the correct name? See 217 Is the manifest put in the right directory and with the correct name? See
217 <a href="#native-messaging-host-location">native messaging host location</ a> 218 <a href="#native-messaging-host-location">native messaging host location</ a>
218 for the expected formats. 219 for the expected formats.
219 <li> 220 <li>
220 Is the manifest file in the correct format? In particular, is the JSON 221 Is the manifest file in the correct format? In particular, is the JSON
221 syntax correct and do the values match the definition of a 222 syntax correct and do the values match the definition of a
222 <a href="#native-messaging-host-manifest">native messaging host manifest</ a>? 223 <a href="#native-messaging-host-manifest">native messaging host manifest</ a>?
223 <li> 224 <li>
224 Does the file specified in <code>path</code> exist? On Windows, paths 225 Does the file specified in <code>path</code> exist? On Linux and OS X the
225 may be relative, but on OS X and Linux, the paths must be absolute. 226 path may be relative, but on Windows the path must be absolute.
226 </ul> 227 </ul>
227 228
228 <dt>Native messaging host <em>host name</em> is not registered. (Windows-only) 229 <dt>Native messaging host <em>host name</em> is not registered. (Windows-only)
229 <dd>The native messaging host was not found in the Windows registry. Double-ch eck 230 <dd>The native messaging host was not found in the Windows registry. Double-ch eck
230 using <code>regedit</code> whether the key was really created and matches the 231 using <code>regedit</code> whether the key was really created and matches the
231 required format as documented at 232 required format as documented at
232 <a href="#native-messaging-host-location">native messaging host location</a>. 233 <a href="#native-messaging-host-location">native messaging host location</a>.
233 234
234 <dt>Access to the specified native messaging host is forbidden. 235 <dt>Access to the specified native messaging host is forbidden.
235 <dd>Is the extension's origin listed in <code>allowed_origins</code>? 236 <dd>Is the extension's origin listed in <code>allowed_origins</code>?
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 and 277 and
277 <a href="https://developer.chrome.com/extensions/examples/api/nativeMessaging/ho st.zip">sample host</a>. 278 <a href="https://developer.chrome.com/extensions/examples/api/nativeMessaging/ho st.zip">sample host</a>.
278 279
279 Run <code>install_host.bat</code> (Windows) or 280 Run <code>install_host.bat</code> (Windows) or
280 <code>install_host.sh</code> (Linux / OS X) to install the native messaging 281 <code>install_host.sh</code> (Linux / OS X) to install the native messaging
281 host. 282 host.
282 Then <a href="getstarted#unpacked">load the app</a> and interact with the app. 283 Then <a href="getstarted#unpacked">load the app</a> and interact with the app.
283 Run <code>uninstall_host.bat</code> or <code>uninstall_host.sh</code> to 284 Run <code>uninstall_host.bat</code> or <code>uninstall_host.sh</code> to
284 unregister the native messaging host when you are done. 285 unregister the native messaging host when you are done.
285 286
OLDNEW
« no previous file with comments | « no previous file | extensions/common/api/runtime.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698