2016-07-17 08:00:03 +00:00
|
|
|
$NetBSD$
|
|
|
|
|
2020-07-27 03:07:44 +00:00
|
|
|
--- extensions/browser/api/messaging/message_service.cc.orig 2020-07-08 21:40:43.000000000 +0000
|
|
|
|
+++ extensions/browser/api/messaging/message_service.cc
|
|
|
|
@@ -61,7 +61,7 @@ namespace {
|
2016-02-24 02:06:20 +00:00
|
|
|
|
|
|
|
const char kReceivingEndDoesntExistError[] =
|
|
|
|
"Could not establish connection. Receiving end does not exist.";
|
|
|
|
-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
|
|
|
|
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
|
|
|
|
const char kMissingPermissionError[] =
|
|
|
|
"Access to native messaging requires nativeMessaging permission.";
|
|
|
|
const char kProhibitedByPoliciesError[] =
|
2020-07-27 03:07:44 +00:00
|
|
|
@@ -391,7 +391,7 @@ void MessageService::OpenChannelToNative
|
|
|
|
if (!opener_port->IsValidPort())
|
2016-02-24 02:06:20 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
|
|
|
|
+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
|
2020-07-27 03:07:44 +00:00
|
|
|
bool has_permission = extension->permissions_data()->HasAPIPermission(
|
|
|
|
APIPermission::kNativeMessaging);
|
|
|
|
if (!has_permission) {
|
|
|
|
@@ -441,7 +441,7 @@ void MessageService::OpenChannelToNative
|
2017-02-17 22:27:08 +00:00
|
|
|
channel->opener->IncrementLazyKeepaliveCount();
|
|
|
|
|
|
|
|
AddChannel(std::move(channel), receiver_port_id);
|
|
|
|
-#else // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX))
|
2020-07-27 03:07:44 +00:00
|
|
|
+#else // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)) || defined(OS_BSD)
|
2017-02-17 22:27:08 +00:00
|
|
|
const char kNativeMessagingNotSupportedError[] =
|
|
|
|
"Native Messaging is not supported on this platform.";
|
2020-07-27 03:07:44 +00:00
|
|
|
opener_port->DispatchOnDisconnect(kNativeMessagingNotSupportedError);
|