diff options
Diffstat (limited to 'chrome/browser/extensions/api/copresence_private/copresence_private_api.h')
-rw-r--r-- | chrome/browser/extensions/api/copresence_private/copresence_private_api.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/chrome/browser/extensions/api/copresence_private/copresence_private_api.h b/chrome/browser/extensions/api/copresence_private/copresence_private_api.h index 3377336..d4c2098 100644 --- a/chrome/browser/extensions/api/copresence_private/copresence_private_api.h +++ b/chrome/browser/extensions/api/copresence_private/copresence_private_api.h @@ -5,7 +5,9 @@ #ifndef CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_API_H_ #define CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_API_H_ -#include "chrome/browser/extensions/chrome_extension_function.h" +#include <string> + +#include "extensions/browser/extension_function.h" namespace audio_modem { class WhispernetClient; @@ -13,13 +15,15 @@ class WhispernetClient; namespace extensions { -class CopresencePrivateFunction : public ChromeUIThreadExtensionFunction { - protected: - audio_modem::WhispernetClient* GetWhispernetClient(); - ~CopresencePrivateFunction() override {} -}; +namespace copresence_private { + +// Register a client to receive events from Whispernet. +const std::string +RegisterWhispernetClient(audio_modem::WhispernetClient* client); + +} // namespace copresence_private -class CopresencePrivateSendFoundFunction : public CopresencePrivateFunction { +class CopresencePrivateSendFoundFunction : public UIThreadExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendFound", COPRESENCEPRIVATE_SENDFOUND); @@ -29,7 +33,7 @@ class CopresencePrivateSendFoundFunction : public CopresencePrivateFunction { ExtensionFunction::ResponseAction Run() override; }; -class CopresencePrivateSendSamplesFunction : public CopresencePrivateFunction { +class CopresencePrivateSendSamplesFunction : public UIThreadExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendSamples", COPRESENCEPRIVATE_SENDSAMPLES); @@ -39,7 +43,7 @@ class CopresencePrivateSendSamplesFunction : public CopresencePrivateFunction { ExtensionFunction::ResponseAction Run() override; }; -class CopresencePrivateSendDetectFunction : public CopresencePrivateFunction { +class CopresencePrivateSendDetectFunction : public UIThreadExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendDetect", COPRESENCEPRIVATE_SENDDETECT); @@ -50,7 +54,7 @@ class CopresencePrivateSendDetectFunction : public CopresencePrivateFunction { }; class CopresencePrivateSendInitializedFunction - : public CopresencePrivateFunction { + : public UIThreadExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendInitialized", COPRESENCEPRIVATE_SENDINITIALIZED); |