Chromium Code Reviews| 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 public: | |
| 18 copresence::WhispernetClient* GetWhispernetClient(); | |
|
not at google - send to devlin
2014/08/01 21:11:58
protected?
rkc
2014/08/01 21:21:12
Done.
| |
| 19 | |
| 20 protected: | |
| 21 virtual ~CopresencePrivateFunction() {} | |
| 22 }; | |
| 23 | |
| 24 class CopresencePrivateSendFoundFunction : public CopresencePrivateFunction { | |
| 25 public: | |
| 26 DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendFound", | |
| 27 COPRESENCEPRIVATE_SENDFOUND); | |
| 28 | |
| 29 protected: | |
| 30 virtual ~CopresencePrivateSendFoundFunction() {} | |
| 31 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; | |
| 32 }; | |
| 33 | |
| 34 class CopresencePrivateSendSamplesFunction : public CopresencePrivateFunction { | |
| 35 public: | |
| 36 DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendSamples", | |
| 37 COPRESENCEPRIVATE_SENDSAMPLES); | |
| 38 | |
| 39 protected: | |
| 40 virtual ~CopresencePrivateSendSamplesFunction() {} | |
| 41 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; | |
| 42 }; | |
| 43 | |
| 44 class CopresencePrivateSendDetectFunction : public CopresencePrivateFunction { | |
| 45 public: | |
| 46 DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendDetect", | |
| 47 COPRESENCEPRIVATE_SENDDETECT); | |
| 48 | |
| 49 protected: | |
| 50 virtual ~CopresencePrivateSendDetectFunction() {} | |
| 51 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; | |
| 52 }; | |
| 53 | |
| 54 class CopresencePrivateSendInitializedFunction | |
| 55 : public CopresencePrivateFunction { | |
| 56 public: | |
| 57 DECLARE_EXTENSION_FUNCTION("copresencePrivate.sendInitialized", | |
| 58 COPRESENCEPRIVATE_SENDINITIALIZED); | |
| 59 | |
| 60 protected: | |
| 61 virtual ~CopresencePrivateSendInitializedFunction() {} | |
| 62 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; | |
| 63 }; | |
| 64 | |
| 65 // This will go away once we check in the code for the CopresenceAPI BCK | |
| 66 // service which lets us inject a whispernet client. | |
| 67 void SetWhispernetClientForTesting(copresence::WhispernetClient* client); | |
| 68 | |
| 69 } // namespace extensions | |
| 70 | |
| 71 #endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_A PI_H_ | |
| OLD | NEW |