Improve native messaging documentation
- Specify format of NMH manifest.
- Specify the expected locations of the NMH on all platforms.
- Fully document the communication protocol and constraints.
- Document every error and offer tips for resolving the issues.
- Document other common problems and how-to-solve.
BUG=377582R=sergeyu@chromium.org,kalman@chromium.org
NOTRY=true
Committed: https://crrev.com/0db8ee2ffb6efbce5f14a40729e8fd5eebf9d38f
Cr-Commit-Position: refs/heads/master@{#308420}
(re-uploaded issue, now with correct base URL)
Sergey: Please review when you're back.
kalman: Need your OWNER LG after Sergey's LG.
The native messaging docs span 6 pages after this CL. Does it make sense to move
the documentation to a separate page (e.g /{apps,extensions}/nativeMessaging)?
https://codereview.chromium.org/768373004/diff/1/chrome/common/extensions/doc...
File chrome/common/extensions/docs/templates/articles/messaging.html (right):
https://codereview.chromium.org/768373004/diff/1/chrome/common/extensions/doc...
chrome/common/extensions/docs/templates/articles/messaging.html:307: <p>The
native messaging host manifest file must be valid JSON and contains the
On 2014/12/03 09:28:31, Alexander Kashev wrote:
> I think the grammar here should be "must be ... and contain"
The sentence is correct. Read the sentence as follows:
"The NMH manifest file (must be valid JSON) and (contains the following
fields)."
https://codereview.chromium.org/768373004/diff/1/chrome/common/extensions/doc...
chrome/common/extensions/docs/templates/articles/messaging.html:358: and set
default value of that key to the full path to the manifest file.<br>
On 2014/12/03 09:28:31, Alexander Kashev wrote:
> Since you're updating the documentation: it would be great to specify how
> backslashes in the path in the registry should be formatted. This has been a
> source of confusion before (e.g.
>
http://stackoverflow.com/questions/21961775/chrome-native-messaging-on-windows);
> it would be nice if there was a sample in the REG-file format.
The usual Windows path syntax applies. Paths are separated by a backslash, but
in contexts where a backslash is an escape character, two backslashes have to be
used. I have added three examples (2 inline in the documentation, one in a
separate file).
https://codereview.chromium.org/768373004/diff/1/chrome/common/extensions/doc...
chrome/common/extensions/docs/templates/articles/messaging.html:402: hard limit
on the size of the message sent to the native messaging host.
On 2014/12/03 09:28:32, Alexander Kashev wrote:
> Technically, not true: message sent to the host is limited by the 32-bit
length
> field.
Done.
Sergey Ulanov
Thanks for updating the docs! https://codereview.chromium.org/768373004/diff/20001/chrome/common/extensions/docs/templates/articles/messaging.html File chrome/common/extensions/docs/templates/articles/messaging.html (right): https://codereview.chromium.org/768373004/diff/20001/chrome/common/extensions/docs/templates/articles/messaging.html#newcode380 chrome/common/extensions/docs/templates/articles/messaging.html:380: </p> nit: don't need ...
Done. And also added the suggested change in the documentation to the Python sample. https://codereview.chromium.org/768373004/diff/20001/chrome/common/extensions/docs/templates/articles/messaging.html ...
On 2014/12/11 21:51:19, robwu wrote:
> Sergey, one more change. I've moved the NM docs to a new page, and made the
> following hanges. Still LG?
>
> messaging (preview):
>
https://chrome-apps-doc.appspot.com/_patch/768373004/extensions/messaging#nat...
> - #native-messaging - The whole native messaging section has been replaced
with
> a short paragraph that refers to nativeMessaging.
> - #examples - The sample now refers to the nativeMessaging page.
>
> nativeMessaging (new! preview):
>
https://chrome-apps-doc.appspot.com/_patch/768373004/extensions/nativeMessaging
> - Introduction - links back to messaging.
> - #examples - Explains how to use the sample code.
What about existing links (say, on SO) that link to anchors within the removed
portion?
Namely, #native-messaging-host and #native-messaging-client
It would be nice if those fragments still led to the same paragraph.
Alexander Kashev
On 2014/12/11 23:11:36, Alexander Kashev wrote: > On 2014/12/11 21:51:19, robwu wrote: > > Sergey, ...
On 2014/12/11 23:11:36, Alexander Kashev wrote:
> On 2014/12/11 21:51:19, robwu wrote:
> > Sergey, one more change. I've moved the NM docs to a new page, and made the
> > following hanges. Still LG?
> >
> > messaging (preview):
> >
>
https://chrome-apps-doc.appspot.com/_patch/768373004/extensions/messaging#nat...
> > - #native-messaging - The whole native messaging section has been replaced
> with
> > a short paragraph that refers to nativeMessaging.
> > - #examples - The sample now refers to the nativeMessaging page.
> >
> > nativeMessaging (new! preview):
> >
>
https://chrome-apps-doc.appspot.com/_patch/768373004/extensions/nativeMessaging
> > - Introduction - links back to messaging.
> > - #examples - Explains how to use the sample code.
>
> What about existing links (say, on SO) that link to anchors within the removed
> portion?
>
> Namely, #native-messaging-host and #native-messaging-client
>
> It would be nice if those fragments still led to the same paragraph.
"The same" = the new short paragraph, not a redirect to the new page.
Alexander Kashev
On 2014/12/11 23:12:30, Alexander Kashev wrote: > On 2014/12/11 23:11:36, Alexander Kashev wrote: > > ...
On 2014/12/11 23:12:30, Alexander Kashev wrote:
> On 2014/12/11 23:11:36, Alexander Kashev wrote:
> > On 2014/12/11 21:51:19, robwu wrote:
> > > Sergey, one more change. I've moved the NM docs to a new page, and made
the
> > > following hanges. Still LG?
> > >
> > > messaging (preview):
> > >
> >
>
https://chrome-apps-doc.appspot.com/_patch/768373004/extensions/messaging#nat...
> > > - #native-messaging - The whole native messaging section has been replaced
> > with
> > > a short paragraph that refers to nativeMessaging.
> > > - #examples - The sample now refers to the nativeMessaging page.
> > >
> > > nativeMessaging (new! preview):
> > >
> >
>
https://chrome-apps-doc.appspot.com/_patch/768373004/extensions/nativeMessaging
> > > - Introduction - links back to messaging.
> > > - #examples - Explains how to use the sample code.
> >
> > What about existing links (say, on SO) that link to anchors within the
removed
> > portion?
> >
> > Namely, #native-messaging-host and #native-messaging-client
> >
> > It would be nice if those fragments still led to the same paragraph.
>
> "The same" = the new short paragraph, not a redirect to the new page.
Oh, sorry, you already do that. Disregard.
Sergey Ulanov
On 2014/12/11 21:51:19, robwu wrote: > Sergey, one more change. I've moved the NM docs ...
On 2014/12/11 21:51:19, robwu wrote:
> Sergey, one more change. I've moved the NM docs to a new page, and made the
> following hanges. Still LG?
>
> messaging (preview):
>
https://chrome-apps-doc.appspot.com/_patch/768373004/extensions/messaging#nat...
> - #native-messaging - The whole native messaging section has been replaced
with
> a short paragraph that refers to nativeMessaging.
> - #examples - The sample now refers to the nativeMessaging page.
>
> nativeMessaging (new! preview):
>
https://chrome-apps-doc.appspot.com/_patch/768373004/extensions/nativeMessaging
> - Introduction - links back to messaging.
> - #examples - Explains how to use the sample code.
Still LGTM, except that I don't see navigation panel on the right of the new
page. Is that a problem with https://chrome-apps-doc.appspot.com ? Do you see
sidenav when running the server on your machine?
robwu
On 2014/12/15 19:18:52, Sergey Ulanov wrote: > On 2014/12/11 21:51:19, robwu wrote: > > Sergey, ...
On 2014/12/15 19:18:52, Sergey Ulanov wrote:
> On 2014/12/11 21:51:19, robwu wrote:
> > Sergey, one more change. I've moved the NM docs to a new page, and made the
> > following hanges. Still LG?
> >
> > messaging (preview):
> >
>
https://chrome-apps-doc.appspot.com/_patch/768373004/extensions/messaging#nat...
> > - #native-messaging - The whole native messaging section has been replaced
> with
> > a short paragraph that refers to nativeMessaging.
> > - #examples - The sample now refers to the nativeMessaging page.
> >
> > nativeMessaging (new! preview):
> >
>
https://chrome-apps-doc.appspot.com/_patch/768373004/extensions/nativeMessaging
> > - Introduction - links back to messaging.
> > - #examples - Explains how to use the sample code.
>
> Still LGTM, except that I don't see navigation panel on the right of the new
> page. Is that a problem with https://chrome-apps-doc.appspot.com ? Do you see
> sidenav when running the server on your machine?
I do see the nav at that appspot URL: http://i.imgur.com/yG7rYRt.png
On 2014/12/15 19:30:16, Sergey Ulanov wrote:
> On 2014/12/15 19:28:58, Sergey Ulanov wrote:
> > On 2014/12/15 19:26:38, robwu wrote:
> > > On 2014/12/15 19:18:52, Sergey Ulanov wrote:
> > > > Still LGTM, except that I don't see navigation panel on the right of the
> new
> > > > page. Is that a problem with https://chrome-apps-doc.appspot.com ? Do
you
> > see
> > > > sidenav when running the server on your machine?
> > >
> > > I do see the nav at that appspot URL: http://i.imgur.com/yG7rYRt.png
> >
> > Nope, you see the same that I see. Compare nav bars on
> > https://chrome-apps-doc.appspot.com/_patch/768373004/extensions/messaging
and
> >
>
https://chrome-apps-doc.appspot.com/_patch/768373004/extensions/nativeMessaging
> > .
>
> Specifically I think there must be some content inside of the grey box above
the
> "Contents" line.
I see. This appearance is not specific to the new nativeMessaging docs, the nav
("related pages") is also missing from apps/messaging
(https://developer.chrome.com/apps/messaging).
I've created a new ticket at https://crbug.com/442471. The absence of the TOC is
not critical for the documentation itself, are you fine with landing the CL and
editing the TOC later (if necessary)? If so, set the commit bit.
Issue 768373004: Improve native messaging documentation
(Closed)
Created 6 years ago by robwu
Modified 6 years ago
Reviewers: not at google - send to devlin, Sergey Ulanov, Alexander Kashev
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 16