OLD | NEW |
(Empty) | |
| 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 virtual ~CopresencePrivateFunction() {} |
| 20 }; |
| 21 |
| 22 class CopresencePrivateSendFoundFunction : public CopresencePrivateFunction { |
| 23 public: |
| 24 DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendFound", |
| 25 COPRESENCEPRIVATE_SENDFOUND); |
| 26 |
| 27 protected: |
| 28 virtual ~CopresencePrivateSendFoundFunction() {} |
| 29 virtual 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 virtual ~CopresencePrivateSendSamplesFunction() {} |
| 39 virtual 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 virtual ~CopresencePrivateSendDetectFunction() {} |
| 49 virtual 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 virtual ~CopresencePrivateSendInitializedFunction() {} |
| 60 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; |
| 61 }; |
| 62 |
| 63 // This will go away once we check in the code for the CopresenceAPI BCK |
| 64 // service which lets us inject a whispernet client. |
| 65 void SetWhispernetClientForTesting(copresence::WhispernetClient* client); |
| 66 |
| 67 } // namespace extensions |
| 68 |
| 69 #endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_A
PI_H_ |
OLD | NEW |