| Index: chrome/browser/extensions/api/networking_cast/networking_cast_api.h
|
| diff --git a/chrome/browser/extensions/api/networking_cast/networking_cast_api.h b/chrome/browser/extensions/api/networking_cast/networking_cast_api.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..cd0683d71a08b5ba20de10784b83ec7331822b13
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/api/networking_cast/networking_cast_api.h
|
| @@ -0,0 +1,128 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_EXTENSIONS_API_NETWORKING_CAST_NETWORKING_CAST_API_H_
|
| +#define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_CAST_NETWORKING_CAST_API_H_
|
| +
|
| +#include <memory>
|
| +#include <string>
|
| +
|
| +#include "base/macros.h"
|
| +#include "extensions/browser/extension_function.h"
|
| +
|
| +namespace base {
|
| +class DictionaryValue;
|
| +}
|
| +
|
| +namespace extensions {
|
| +
|
| +class NetworkingCastVerifyDestinationFunction
|
| + : public UIThreadExtensionFunction {
|
| + public:
|
| + NetworkingCastVerifyDestinationFunction() {}
|
| + DECLARE_EXTENSION_FUNCTION("networking.cast.verifyDestination",
|
| + NETWORKINGCAST_VERIFYDESTINATION);
|
| +
|
| + protected:
|
| + ~NetworkingCastVerifyDestinationFunction() override;
|
| +
|
| + // ExtensionFunction:
|
| + ResponseAction Run() override;
|
| +
|
| + void Success(bool result);
|
| + void Failure(const std::string& error);
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(NetworkingCastVerifyDestinationFunction);
|
| +};
|
| +
|
| +class NetworkingCastVerifyAndEncryptCredentialsFunction
|
| + : public UIThreadExtensionFunction {
|
| + public:
|
| + NetworkingCastVerifyAndEncryptCredentialsFunction() {}
|
| + DECLARE_EXTENSION_FUNCTION("networking.cast.verifyAndEncryptCredentials",
|
| + NETWORKINGCAST_VERIFYANDENCRYPTCREDENTIALS);
|
| +
|
| + protected:
|
| + ~NetworkingCastVerifyAndEncryptCredentialsFunction() override;
|
| +
|
| + // ExtensionFunction:
|
| + ResponseAction Run() override;
|
| +
|
| + void Success(const std::string& result);
|
| + void Failure(const std::string& error);
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(NetworkingCastVerifyAndEncryptCredentialsFunction);
|
| +};
|
| +
|
| +class NetworkingCastVerifyAndEncryptDataFunction
|
| + : public UIThreadExtensionFunction {
|
| + public:
|
| + NetworkingCastVerifyAndEncryptDataFunction() {}
|
| + DECLARE_EXTENSION_FUNCTION("networking.cast.verifyAndEncryptData",
|
| + NETWORKINGCAST_VERIFYANDENCRYPTDATA);
|
| +
|
| + protected:
|
| + ~NetworkingCastVerifyAndEncryptDataFunction() override;
|
| +
|
| + // ExtensionFunction:
|
| + ResponseAction Run() override;
|
| +
|
| + void Success(const std::string& result);
|
| + void Failure(const std::string& error);
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(NetworkingCastVerifyAndEncryptDataFunction);
|
| +};
|
| +
|
| +class NetworkingCastSetWifiTDLSEnabledStateFunction
|
| + : public UIThreadExtensionFunction {
|
| + public:
|
| + NetworkingCastSetWifiTDLSEnabledStateFunction() {}
|
| + DECLARE_EXTENSION_FUNCTION("networking.cast.setWifiTDLSEnabledState",
|
| + NETWORKINGCAST_SETWIFITDLSENABLEDSTATE);
|
| +
|
| + protected:
|
| + ~NetworkingCastSetWifiTDLSEnabledStateFunction() override;
|
| +
|
| + // ExtensionFunction:
|
| + ResponseAction Run() override;
|
| +
|
| +#if defined(OS_CHROMEOS)
|
| + void Success(const std::string& result);
|
| + void Failure(const std::string& error,
|
| + std::unique_ptr<base::DictionaryValue> error_data);
|
| +#endif
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(NetworkingCastSetWifiTDLSEnabledStateFunction);
|
| +};
|
| +
|
| +class NetworkingCastGetWifiTDLSStatusFunction
|
| + : public UIThreadExtensionFunction {
|
| + public:
|
| + NetworkingCastGetWifiTDLSStatusFunction() {}
|
| + DECLARE_EXTENSION_FUNCTION("networking.cast.getWifiTDLSStatus",
|
| + NETWORKINGCAST_GETWIFITDLSSTATUS);
|
| +
|
| + protected:
|
| + ~NetworkingCastGetWifiTDLSStatusFunction() override;
|
| +
|
| + // ExtensionFunction:
|
| + ResponseAction Run() override;
|
| +
|
| +#if defined(OS_CHROMEOS)
|
| + void Success(const std::string& result);
|
| + void Failure(const std::string& error,
|
| + std::unique_ptr<base::DictionaryValue> error_data);
|
| +#endif
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(NetworkingCastGetWifiTDLSStatusFunction);
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_CAST_NETWORKING_CAST_API_H_
|
|
|