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) { ...@@ -616,7 +616,9 @@ if (enable_remoting_host) {
script = "../tools/build/remoting_localize.py" script = "../tools/build/remoting_localize.py"
sources = [ sources = [
"it2me/com.google.chrome.remote_assistance-firefox.json.jinja2",
"it2me/com.google.chrome.remote_assistance.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", "setup/com.google.chrome.remote_desktop.json.jinja2",
] ]
......
...@@ -13,7 +13,8 @@ endif ...@@ -13,7 +13,8 @@ endif
CRON_DIR = $(DESTDIR)/etc/cron.daily CRON_DIR = $(DESTDIR)/etc/cron.daily
DOC_DIR = $(DESTDIR)/usr/share/doc/chrome-remote-desktop DOC_DIR = $(DESTDIR)/usr/share/doc/chrome-remote-desktop
INSTALL_DIR = $(DESTDIR)/opt/google/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_PROGNAME = $(BUILD_DIR)/remoting_me2me_host
ME2ME_DEBUGFILE = $(ME2ME_PROGNAME).debug ME2ME_DEBUGFILE = $(ME2ME_PROGNAME).debug
...@@ -33,7 +34,8 @@ install: ...@@ -33,7 +34,8 @@ install:
install -d "$(DOC_DIR)" install -d "$(DOC_DIR)"
install -d "$(INSTALL_DIR)" install -d "$(INSTALL_DIR)"
install -d "$(INSTALL_DIR)/remoting_locales" 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 "$(SRC_DIR)/remoting/host/linux/linux_me2me_host.py" \
"$(INSTALL_DIR)/chrome-remote-desktop" "$(INSTALL_DIR)/chrome-remote-desktop"
...@@ -41,12 +43,18 @@ install: ...@@ -41,12 +43,18 @@ install:
"$(INSTALL_DIR)" "$(INSTALL_DIR)"
install -m 0644 \ install -m 0644 \
"$(BUILD_DIR)/remoting/com.google.chrome.remote_desktop.json" \ "$(BUILD_DIR)/remoting/com.google.chrome.remote_desktop.json" \
"$(NATIVE_MESSAGING_DIR)/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 \ install -m 0644 \
"$(BUILD_DIR)/remoting/com.google.chrome.remote_assistance.json" \ "$(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 "$(ME2ME_PROGNAME)" \
"$(INSTALL_DIR)/chrome-remote-desktop-host" "$(INSTALL_DIR)/chrome-remote-desktop-host"
......
...@@ -51,6 +51,8 @@ action("remoting_me2me_host_archive") { ...@@ -51,6 +51,8 @@ action("remoting_me2me_host_archive") {
"remoting_host_uninstaller.app", "remoting_host_uninstaller.app",
"remoting/com.google.chrome.remote_desktop.json", "remoting/com.google.chrome.remote_desktop.json",
"remoting/com.google.chrome.remote_assistance.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", "--generated-files-dst",
"PrivilegedHelperTools/$host_bundle_name", "PrivilegedHelperTools/$host_bundle_name",
"PrivilegedHelperTools/$host_bundle_name/Contents/MacOS/$native_messaging_host_bundle_name", "PrivilegedHelperTools/$host_bundle_name/Contents/MacOS/$native_messaging_host_bundle_name",
...@@ -58,6 +60,8 @@ action("remoting_me2me_host_archive") { ...@@ -58,6 +60,8 @@ action("remoting_me2me_host_archive") {
"Applications/$host_uninstaller_name.app", "Applications/$host_uninstaller_name.app",
"Config/com.google.chrome.remote_desktop.json", "Config/com.google.chrome.remote_desktop.json",
"Config/com.google.chrome.remote_assistance.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", "--defs",
"VERSION=$chrome_version_full", "VERSION=$chrome_version_full",
"VERSION_SHORT=$chrome_version_major.$chrome_version_minor.$chrome_version_build", "VERSION_SHORT=$chrome_version_major.$chrome_version_minor.$chrome_version_build",
......
...@@ -50,7 +50,74 @@ ...@@ -50,7 +50,74 @@
<array> <array>
<dict> <dict>
<key>CHILDREN</key> <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> <key>GID</key>
<integer>80</integer> <integer>80</integer>
<key>PATH</key> <key>PATH</key>
......
...@@ -139,7 +139,9 @@ const char kKeystonePID[] = "com.google.chrome_remote_desktop"; ...@@ -139,7 +139,9 @@ const char kKeystonePID[] = "com.google.chrome_remote_desktop";
[self sudoDelete:remoting::kHostConfigFilePath usingAuth:authRef]; [self sudoDelete:remoting::kHostConfigFilePath usingAuth:authRef];
[self sudoDelete:remoting::kLogFilePath usingAuth:authRef]; [self sudoDelete:remoting::kLogFilePath usingAuth:authRef];
[self sudoDelete:remoting::kLogFileConfigPath 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::kBrandedUninstallerPath usingAuth:authRef];
[self sudoDelete:remoting::kUnbrandedUninstallerPath 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"; ...@@ -30,9 +30,16 @@ const char kServicePlistPath[] = LAUNCH_AGENTS_DIR SERVICE_NAME ".plist";
const char kLogFilePath[] = LOG_DIR SERVICE_NAME ".log"; const char kLogFilePath[] = LOG_DIR SERVICE_NAME ".log";
const char kLogFileConfigPath[] = LOG_CONFIG_DIR SERVICE_NAME ".conf"; const char kLogFileConfigPath[] = LOG_CONFIG_DIR SERVICE_NAME ".conf";
const char kNativeMessagingManifestPath[] = const char* kNativeMessagingManifestPaths[4] = {
"/Library/Google/Chrome/NativeMessagingHosts/" "/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[] = const char kBrandedUninstallerPath[] =
APPLICATIONS_DIR "Chrome Remote Desktop Host Uninstaller.app"; APPLICATIONS_DIR "Chrome Remote Desktop Host Uninstaller.app";
......
...@@ -38,8 +38,8 @@ extern const char kLogFilePath[]; ...@@ -38,8 +38,8 @@ extern const char kLogFilePath[];
// Path to the log config file // Path to the log config file
extern const char kLogFileConfigPath[]; extern const char kLogFileConfigPath[];
// Path to the native messaging host manifest // Paths to the native messaging host manifests
extern const char kNativeMessagingManifestPath[]; extern const char* kNativeMessagingManifestPaths[4];
// The branded and unbranded names for the uninstaller. // The branded and unbranded names for the uninstaller.
// This is the only file that changes names based on branding. We define both // 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