Commit 1530edb9 authored by Erik Jensen's avatar Erik Jensen Committed by Commit Bot

Add native messaging manifests for Firefox

Updates Mac and Linux installers to place manifests in proper per-
platform location. Windows is more complicated due to 32/64-bit registry
considerations, so the installer will be updated in a follow-up commit.

Change-Id: If2f6a4f77e013703c146bba91aaa4362eea12e11
Reviewed-on: https://chromium-review.googlesource.com/1187659
Commit-Queue: Erik Jensen <rkjnsn@chromium.org>
Reviewed-by: default avatarJamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586017}
parent 497cb60f
......@@ -616,7 +616,9 @@ if (enable_remoting_host) {
script = "../tools/build/remoting_localize.py"
sources = [
"it2me/com.google.chrome.remote_assistance-firefox.json.jinja2",
"it2me/com.google.chrome.remote_assistance.json.jinja2",
"setup/com.google.chrome.remote_desktop-firefox.json.jinja2",
"setup/com.google.chrome.remote_desktop.json.jinja2",
]
......
......@@ -13,7 +13,8 @@ endif
CRON_DIR = $(DESTDIR)/etc/cron.daily
DOC_DIR = $(DESTDIR)/usr/share/doc/chrome-remote-desktop
INSTALL_DIR = $(DESTDIR)/opt/google/chrome-remote-desktop
NATIVE_MESSAGING_DIR = $(DESTDIR)/etc/opt/chrome/native-messaging-hosts
CHROME_NATIVE_MESSAGING_DIR = $(DESTDIR)/etc/opt/chrome/native-messaging-hosts
FIREFOX_NATIVE_MESSAGING_DIR = $(DESTDIR)/usr/lib/mozilla/native-messaging-hosts
ME2ME_PROGNAME = $(BUILD_DIR)/remoting_me2me_host
ME2ME_DEBUGFILE = $(ME2ME_PROGNAME).debug
......@@ -33,7 +34,8 @@ install:
install -d "$(DOC_DIR)"
install -d "$(INSTALL_DIR)"
install -d "$(INSTALL_DIR)/remoting_locales"
install -d "$(NATIVE_MESSAGING_DIR)"
install -d "$(CHROME_NATIVE_MESSAGING_DIR)"
install -d "$(FIREFOX_NATIVE_MESSAGING_DIR)"
install "$(SRC_DIR)/remoting/host/linux/linux_me2me_host.py" \
"$(INSTALL_DIR)/chrome-remote-desktop"
......@@ -41,12 +43,18 @@ install:
"$(INSTALL_DIR)"
install -m 0644 \
"$(BUILD_DIR)/remoting/com.google.chrome.remote_desktop.json" \
"$(NATIVE_MESSAGING_DIR)/com.google.chrome.remote_desktop.json"
"$(BUILD_DIR)/remoting/com.google.chrome.remote_desktop.json" \
"$(CHROME_NATIVE_MESSAGING_DIR)/com.google.chrome.remote_desktop.json"
install -m 0644 \
"$(BUILD_DIR)/remoting/com.google.chrome.remote_desktop-firefox.json" \
"$(FIREFOX_NATIVE_MESSAGING_DIR)/com.google.chrome.remote_desktop.json"
install -m 0644 \
"$(BUILD_DIR)/remoting/com.google.chrome.remote_assistance.json" \
"$(NATIVE_MESSAGING_DIR)/com.google.chrome.remote_assistance.json"
"$(CHROME_NATIVE_MESSAGING_DIR)/com.google.chrome.remote_assistance.json"
install -m 0644 \
"$(BUILD_DIR)/remoting/com.google.chrome.remote_assistance-firefox.json" \
"$(FIREFOX_NATIVE_MESSAGING_DIR)/com.google.chrome.remote_assistance.json"
install "$(ME2ME_PROGNAME)" \
"$(INSTALL_DIR)/chrome-remote-desktop-host"
......
......@@ -51,6 +51,8 @@ action("remoting_me2me_host_archive") {
"remoting_host_uninstaller.app",
"remoting/com.google.chrome.remote_desktop.json",
"remoting/com.google.chrome.remote_assistance.json",
"remoting/com.google.chrome.remote_desktop-firefox.json",
"remoting/com.google.chrome.remote_assistance-firefox.json",
"--generated-files-dst",
"PrivilegedHelperTools/$host_bundle_name",
"PrivilegedHelperTools/$host_bundle_name/Contents/MacOS/$native_messaging_host_bundle_name",
......@@ -58,6 +60,8 @@ action("remoting_me2me_host_archive") {
"Applications/$host_uninstaller_name.app",
"Config/com.google.chrome.remote_desktop.json",
"Config/com.google.chrome.remote_assistance.json",
"Config/Firefox/com.google.chrome.remote_desktop.json",
"Config/Firefox/com.google.chrome.remote_assistance.json",
"--defs",
"VERSION=$chrome_version_full",
"VERSION_SHORT=$chrome_version_major.$chrome_version_minor.$chrome_version_build",
......
......@@ -50,7 +50,74 @@
<array>
<dict>
<key>CHILDREN</key>
<array/>
<array>
<dict>
<key>CHILDREN</key>
<array>
<dict>
<key>CHILDREN</key>
<array>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>0</integer>
<key>PATH</key>
<string>Config/Firefox/com.google.chrome.remote_assistance.json</string>
<key>PATH_TYPE</key>
<integer>1</integer>
<key>PERMISSIONS</key>
<integer>420</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
<dict>
<key>CHILDREN</key>
<array/>
<key>GID</key>
<integer>0</integer>
<key>PATH</key>
<string>Config/Firefox/com.google.chrome.remote_desktop.json</string>
<key>PATH_TYPE</key>
<integer>1</integer>
<key>PERMISSIONS</key>
<integer>420</integer>
<key>TYPE</key>
<integer>3</integer>
<key>UID</key>
<integer>0</integer>
</dict>
</array>
<key>GID</key>
<integer>0</integer>
<key>PATH</key>
<string>NativeMessagingHosts</string>
<key>PATH_TYPE</key>
<integer>2</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>2</integer>
<key>UID</key>
<integer>0</integer>
</dict>
</array>
<key>GID</key>
<integer>0</integer>
<key>PATH</key>
<string>Mozilla</string>
<key>PATH_TYPE</key>
<integer>2</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
<integer>2</integer>
<key>UID</key>
<integer>0</integer>
</dict>
</array>
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
......
......@@ -139,7 +139,9 @@ const char kKeystonePID[] = "com.google.chrome_remote_desktop";
[self sudoDelete:remoting::kHostConfigFilePath usingAuth:authRef];
[self sudoDelete:remoting::kLogFilePath usingAuth:authRef];
[self sudoDelete:remoting::kLogFileConfigPath usingAuth:authRef];
[self sudoDelete:remoting::kNativeMessagingManifestPath usingAuth:authRef];
for (const char* path : remoting::kNativeMessagingManifestPaths) {
[self sudoDelete:path usingAuth:authRef];
}
[self sudoDelete:remoting::kBrandedUninstallerPath usingAuth:authRef];
[self sudoDelete:remoting::kUnbrandedUninstallerPath usingAuth:authRef];
......
{
"name": "com.google.chrome.remote_assistance",
"description": "{{ IT2ME_HOST_DESCRIPTION }}",
"type": "stdio",
"path": "{{ IT2ME_HOST_PATH }}",
"allowed_extensions": [
"remotedesktop@google.com"
]
}
......@@ -30,9 +30,16 @@ const char kServicePlistPath[] = LAUNCH_AGENTS_DIR SERVICE_NAME ".plist";
const char kLogFilePath[] = LOG_DIR SERVICE_NAME ".log";
const char kLogFileConfigPath[] = LOG_CONFIG_DIR SERVICE_NAME ".conf";
const char kNativeMessagingManifestPath[] =
const char* kNativeMessagingManifestPaths[4] = {
"/Library/Google/Chrome/NativeMessagingHosts/"
"com.google.chrome.remote_desktop.json";
"com.google.chrome.remote_desktop.json",
"/Library/Google/Chrome/NativeMessagingHosts/"
"com.google.chrome.remote_assistance.json",
"/Library/Application Support/Mozilla/NativeMessagingHosts/"
"com.google.chrome.remote_desktop.json",
"/Library/Application Support/Mozilla/NativeMessagingHosts/"
"com.google.chrome.remote_assistance.json",
};
const char kBrandedUninstallerPath[] =
APPLICATIONS_DIR "Chrome Remote Desktop Host Uninstaller.app";
......
......@@ -38,8 +38,8 @@ extern const char kLogFilePath[];
// Path to the log config file
extern const char kLogFileConfigPath[];
// Path to the native messaging host manifest
extern const char kNativeMessagingManifestPath[];
// Paths to the native messaging host manifests
extern const char* kNativeMessagingManifestPaths[4];
// The branded and unbranded names for the uninstaller.
// This is the only file that changes names based on branding. We define both
......
{
"name": "com.google.chrome.remote_desktop",
"description": "{{ ME2ME_HOST_DESCRIPTION }}",
"type": "stdio",
"path": "{{ ME2ME_HOST_PATH }}",
"allowed_extensions": [
"remotedesktop@google.com"
]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment