#ifndef CHROME_BROWSER_EXTENSIONS_API_CLOUD_PRINT_PRIVATE_CLOUD_PRINT_PRIVATE_API_H_
#define CHROME_BROWSER_EXTENSIONS_API_CLOUD_PRINT_PRIVATE_CLOUD_PRINT_PRIVATE_API_H_
#include <string>
#include <vector>
#include "chrome/browser/extensions/chrome_extension_function.h"
namespace extensions {
namespace api {
namespace cloud_print_private {
struct UserSettings;
}
}
class CloudPrintTestsDelegate {
public:
CloudPrintTestsDelegate();
virtual ~CloudPrintTestsDelegate();
virtual void SetupConnector(
const std::string& user_email,
const std::string& robot_email,
const std::string& credentials,
const api::cloud_print_private::UserSettings& user_settings) = 0;
virtual std::string GetHostName() = 0;
virtual std::string GetClientId() = 0;
virtual std::vector<std::string> GetPrinters() = 0;
static CloudPrintTestsDelegate* instance();
private:
static CloudPrintTestsDelegate* instance_;
};
class CloudPrintPrivateSetupConnectorFunction
: public ChromeAsyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.setupConnector",
CLOUDPRINTPRIVATE_SETUPCONNECTOR)
CloudPrintPrivateSetupConnectorFunction();
protected:
virtual ~CloudPrintPrivateSetupConnectorFunction();
virtual bool RunImpl() OVERRIDE;
};
class CloudPrintPrivateGetHostNameFunction
: public ChromeAsyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.getHostName",
CLOUDPRINTPRIVATE_GETHOSTNAME)
CloudPrintPrivateGetHostNameFunction();
protected:
virtual ~CloudPrintPrivateGetHostNameFunction();
virtual bool RunImpl() OVERRIDE;
};
class CloudPrintPrivateGetPrintersFunction
: public ChromeAsyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.getPrinters",
CLOUDPRINTPRIVATE_GETPRINTERS)
CloudPrintPrivateGetPrintersFunction();
protected:
virtual ~CloudPrintPrivateGetPrintersFunction();
private:
void SendResults(const std::vector<std::string>& printers);
virtual bool RunImpl() OVERRIDE;
};
class CloudPrintPrivateGetClientIdFunction
: public ChromeAsyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("cloudPrintPrivate.getClientId",
CLOUDPRINTPRIVATE_GETCLIENTID);
CloudPrintPrivateGetClientIdFunction();
protected:
virtual ~CloudPrintPrivateGetClientIdFunction();
virtual bool RunImpl() OVERRIDE;
};
}
#endif