diff options
author | Charlie Kehoe <ckehoe@chromium.org> | 2015-02-19 16:44:34 -0800 |
---|---|---|
committer | Charlie Kehoe <ckehoe@chromium.org> | 2015-02-20 00:45:46 +0000 |
commit | d5f5d1157d418bb545df5621848a8f91e0b5c9f3 (patch) | |
tree | 9d2d834d83ea03b049d4c6bfa4dba42f55a53310 /chrome/browser/extensions/api/copresence_private/copresence_private_api.h | |
parent | da3105a6d3301c557b20fbbee9c5b00ac48840f0 (diff) | |
download | chromium_src-d5f5d1157d418bb545df5621848a8f91e0b5c9f3.zip chromium_src-d5f5d1157d418bb545df5621848a8f91e0b5c9f3.tar.gz chromium_src-d5f5d1157d418bb545df5621848a8f91e0b5c9f3.tar.bz2 |
Adding the Audio Modem API. See design doc at go/chrome-modem.
BUG=455823
R=isherman@chromium.org, rkc@chromium.org, rockot@chromium.org, sky@chromium.org
Review URL: https://codereview.chromium.org/917523004
Cr-Commit-Position: refs/heads/master@{#317196}
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); |