| Index: chrome/common/extensions/docs/templates/articles/nativeMessaging.html
|
| diff --git a/chrome/common/extensions/docs/templates/articles/nativeMessaging.html b/chrome/common/extensions/docs/templates/articles/nativeMessaging.html
|
| index c3f2cb00b3f5e7d1714872093835f90dcf9b0698..3a1f94d493318ac809fc8e094a2c858405609d25 100644
|
| --- a/chrome/common/extensions/docs/templates/articles/nativeMessaging.html
|
| +++ b/chrome/common/extensions/docs/templates/articles/nativeMessaging.html
|
| @@ -129,6 +129,16 @@ mainly to protect Chrome from misbehaving native applications. The maximum
|
| size of the message sent to the native messaging host is 4 GB.
|
|
|
| <p>
|
| +The first argument to the native messaging host is the origin of the caller,
|
| +usually <code>chrome-extension://[ID of whitelisted extension]</code>.
|
| +This allows native messaging hosts to identify the source of the message when
|
| +multiple extensions are specified in the <code>allowed_origins</code> key in the
|
| +<a href="#native-messaging-host-manifest">native messaging host manifest</a>.
|
| +<br>
|
| +<b><em>Warning</em></b>: In Windows, in Chrome 54 and earlier, the origin was
|
| +passed as the second parameter instead of the first parameter.
|
| +
|
| +<p>
|
| When a messaging port is created using $(ref:runtime.connectNative) Chrome
|
| starts native messaging host process and keeps it running until the port is
|
| destroyed. On the other hand, when a message is sent using
|
| @@ -140,7 +150,7 @@ $(ref:runtime.sendNativeMessage) is called. All other messages generated by the
|
| native messaging host in that case are ignored.
|
|
|
| <p>
|
| -On Windows, the native messaging host gets passed a command line argument with
|
| +On Windows, the native messaging host is also passed a command line argument with
|
| a handle to the calling chrome native window: <code>--parent-window=<decimal
|
| handle value></code>. This lets the native messaging host create native UI
|
| windows that are correctly focused.
|
|
|