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

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

Issue 2271143002: Ensure/document that the first parameter to the native messaging host is the origin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reword docs, thanks Devlin Created 4 years, 3 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/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..fd269ac1f6854babd85c9de01d917534e836cbf6 100644
--- a/chrome/common/extensions/docs/templates/articles/nativeMessaging.html
+++ b/chrome/common/extensions/docs/templates/articles/nativeMessaging.html
@@ -129,6 +129,13 @@ 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>.
+
+<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

Powered by Google App Engine
This is Rietveld 408576698