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 10namespace copresence { 11class WhispernetClient; 12} 13 14namespace extensions { 15 16class CopresencePrivateFunction : public ChromeUIThreadExtensionFunction { 17 protected: 18 copresence::WhispernetClient* GetWhispernetClient(); 19 virtual ~CopresencePrivateFunction() {} 20}; 21 22class 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 32class 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 42class 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 52class 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} // namespace extensions 64 65#endif // CHROME_BROWSER_EXTENSIONS_API_COPRESENCE_PRIVATE_COPRESENCE_PRIVATE_API_H_ 66