diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-01 20:10:48 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-01 20:10:48 +0000 |
commit | ddc597aa7d4106abd14b359f71a1ef3cded55ca6 (patch) | |
tree | 8b7aa26b9f5c167f449682b814f7eb1c340ddd43 /chrome/common | |
parent | 012121b869fa52d73cec9954fa7500c514f39e88 (diff) | |
download | chromium_src-ddc597aa7d4106abd14b359f71a1ef3cded55ca6.zip chromium_src-ddc597aa7d4106abd14b359f71a1ef3cded55ca6.tar.gz chromium_src-ddc597aa7d4106abd14b359f71a1ef3cded55ca6.tar.bz2 |
Allow relative native messaging host paths on Windows
BUG=251005
Review URL: https://chromiumcodereview.appspot.com/21378005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215097 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
3 files changed, 29 insertions, 11 deletions
diff --git a/chrome/common/extensions/docs/examples/api/nativeMessaging/README.txt b/chrome/common/extensions/docs/examples/api/nativeMessaging/README.txt index 6719f44..5d5ba75 100644 --- a/chrome/common/extensions/docs/examples/api/nativeMessaging/README.txt +++ b/chrome/common/extensions/docs/examples/api/nativeMessaging/README.txt @@ -2,15 +2,18 @@ This directory contains an example of chrome application that uses native messaging API that allows to communicate with a native application. In order for this example to work you must first install the native messaging -host from the host directory. To install the host on Windows: - 1. Replace HOST_PATH in host/com.google.chrome.example.echo.json with the full - path to host/native-messaging-example-host.bat - 2. In the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\NativeMessagingHosts - add string value "com.google.chrome.example.echo" with full path to - host/com.google.chrome.example.echo.json . +host from the host directory. -Note that you need to have python installed. +To install the host: -On Mac and Linux you can use install_host.sh script in the host directory: - sudo host/install_host.sh -You can later use host/uninstall_host.sh to uninstall the host. +On Windows: + Add registry key + HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\NativeMessagingHosts\com.google.chrome.example.echo + and set its default value to the full path to + host\com.google.chrome.example.echo-win.json . Note that you need to have + python installed. + +On Mac and Linux: + Run install_host.sh script in the host directory: + sudo host/install_host.sh + You can later use host/uninstall_host.sh to uninstall the host. diff --git a/chrome/common/extensions/docs/examples/api/nativeMessaging/host/com.google.chrome.example.echo-win.json b/chrome/common/extensions/docs/examples/api/nativeMessaging/host/com.google.chrome.example.echo-win.json new file mode 100644 index 0000000..84e5448 --- /dev/null +++ b/chrome/common/extensions/docs/examples/api/nativeMessaging/host/com.google.chrome.example.echo-win.json @@ -0,0 +1,13 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +{ + "name": "com.google.chrome.example.echo", + "description": "Chrome Native Messaging API Example Host", + "path": "native-messaging-example-host.bat", + "type": "stdio", + "allowed_origins": [ + "chrome-extension://knldjmfmopnpolahpmmgbagdohdnhkik/" + ] +} diff --git a/chrome/common/extensions/docs/templates/articles/messaging.html b/chrome/common/extensions/docs/templates/articles/messaging.html index 5fea2b3..fe6b4c2 100644 --- a/chrome/common/extensions/docs/templates/articles/messaging.html +++ b/chrome/common/extensions/docs/templates/articles/messaging.html @@ -316,7 +316,9 @@ example of the manifest file: </tr> <tr> <td><code>path</code></td> - <td>Path to the native messaging host binary.</td> + <td>Path to the native messaging host binary. On Linux and OSX the path must + be absolute. On Windows it can be relative to the directory in which the + manifest file is located.</td> </tr> <tr> <td><code>type</code></td> |