Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / api / copresence_private / copresence_private_api.h
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.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_API_H_
7
8 #include "chrome/browser/extensions/chrome_extension_function.h"
9
10 namespace copresence {
11 class WhispernetClient;
12 }
13
14 namespace extensions {
15
16 class CopresencePrivateFunction : public ChromeUIThreadExtensionFunction {
17  protected:
18   copresence::WhispernetClient* GetWhispernetClient();
19   ~CopresencePrivateFunction() override {}
20 };
21
22 class CopresencePrivateSendFoundFunction : public CopresencePrivateFunction {
23  public:
24   DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendFound",
25                              COPRESENCEPRIVATE_SENDFOUND);
26
27  protected:
28   ~CopresencePrivateSendFoundFunction() override {}
29   ExtensionFunction::ResponseAction Run() override;
30 };
31
32 class CopresencePrivateSendSamplesFunction : public CopresencePrivateFunction {
33  public:
34   DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendSamples",
35                              COPRESENCEPRIVATE_SENDSAMPLES);
36
37  protected:
38   ~CopresencePrivateSendSamplesFunction() override {}
39   ExtensionFunction::ResponseAction Run() override;
40 };
41
42 class CopresencePrivateSendDetectFunction : public CopresencePrivateFunction {
43  public:
44   DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendDetect",
45                              COPRESENCEPRIVATE_SENDDETECT);
46
47  protected:
48   ~CopresencePrivateSendDetectFunction() override {}
49   ExtensionFunction::ResponseAction Run() override;
50 };
51
52 class CopresencePrivateSendInitializedFunction
53     : public CopresencePrivateFunction {
54  public:
55   DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendInitialized",
56                              COPRESENCEPRIVATE_SENDINITIALIZED);
57
58  protected:
59   ~CopresencePrivateSendInitializedFunction() override {}
60   ExtensionFunction::ResponseAction Run() override;
61 };
62
63 }  // namespace extensions
64
65 #endif  // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_API_H_