bug 1543115: remote: expose nsIRemoteAgent as XPCOM service; r=remote-protocol-reviewers,maja_zf,nika

This change makes it possible to access the remote agent service
from C++ and Rust.

Differential Revision: https://phabricator.services.mozilla.com/D50288

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andreas Tolfsen 2019-11-19 12:32:51 +00:00
Родитель 24f7b88ad4
Коммит 2cb1328cc1
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -42,3 +42,10 @@ interface nsIRemoteAgent : nsISupports
/** Stops listening and drops existing connections. */
void close();
};
%{C++
#define NS_REMOTEAGENT_CONTRACTID "@mozilla.org/remote/agent;1"
#define NS_REMOTEAGENT_CID \
{ 0x8f685a9d, 0x8181, 0x46d6, \
{ 0xa7, 0x1d, x86, x92, x89, x09, x9c, x6d } }
%}

Просмотреть файл

@ -26,6 +26,8 @@ service('PermissionManager', 'nsIPermissionManager',
"@mozilla.org/permissionmanager;1")
service('PreferencesService', 'nsIPrefService',
"@mozilla.org/preferences-service;1")
service('RemoteAgent', 'nsIRemoteAgent',
"@mozilla.org/remote/agent;1")
service('ServiceWorkerManager', 'nsIServiceWorkerManager',
"@mozilla.org/serviceworkers/manager;1")
service('AsyncShutdown', 'nsIAsyncShutdownService',
@ -77,6 +79,7 @@ CPP_INCLUDES = """
#include "nsIXPConnect.h"
#include "nsIPermissionManager.h"
#include "nsIPrefService.h"
#include "nsIRemoteAgent.h"
#include "nsIServiceWorkerManager.h"
#include "nsICacheStorageService.h"
#include "nsIStreamTransportService.h"