1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_API_H_
8 #include "chrome/browser/extensions/chrome_extension_function.h"
10 namespace copresence {
11 class WhispernetClient;
14 namespace extensions {
16 class CopresencePrivateFunction : public ChromeUIThreadExtensionFunction {
18 copresence::WhispernetClient* GetWhispernetClient();
19 ~CopresencePrivateFunction() override {}
22 class CopresencePrivateSendFoundFunction : public CopresencePrivateFunction {
24 DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendFound",
25 COPRESENCEPRIVATE_SENDFOUND);
28 ~CopresencePrivateSendFoundFunction() override {}
29 ExtensionFunction::ResponseAction Run() override;
32 class CopresencePrivateSendSamplesFunction : public CopresencePrivateFunction {
34 DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendSamples",
35 COPRESENCEPRIVATE_SENDSAMPLES);
38 ~CopresencePrivateSendSamplesFunction() override {}
39 ExtensionFunction::ResponseAction Run() override;
42 class CopresencePrivateSendDetectFunction : public CopresencePrivateFunction {
44 DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendDetect",
45 COPRESENCEPRIVATE_SENDDETECT);
48 ~CopresencePrivateSendDetectFunction() override {}
49 ExtensionFunction::ResponseAction Run() override;
52 class CopresencePrivateSendInitializedFunction
53 : public CopresencePrivateFunction {
55 DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendInitialized",
56 COPRESENCEPRIVATE_SENDINITIALIZED);
59 ~CopresencePrivateSendInitializedFunction() override {}
60 ExtensionFunction::ResponseAction Run() override;
63 } // namespace extensions
65 #endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_API_H_