Add ICU message format support
[chromium-blink-merge.git] / extensions / browser / api / vpn_provider / vpn_provider_api.h
blob3d3bb1deca195cb2ba16ab5fa4b43c846fe2063e
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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_VPN_PROVIDER_VPN_PROVIDER_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_VPN_PROVIDER_VPN_PROVIDER_API_H_
8 #include <string>
10 #include "extensions/browser/extension_function.h"
12 namespace extensions {
14 class VpnThreadExtensionFunction : public UIThreadExtensionFunction {
15 public:
16 void SignalCallCompletionSuccess();
17 void SignalCallCompletionSuccessWithId(const std::string& configuration_id);
18 void SignalCallCompletionSuccessWithWarning(const std::string& warning);
20 void SignalCallCompletionFailure(const std::string& error_name,
21 const std::string& error_message);
23 protected:
24 ~VpnThreadExtensionFunction() override;
27 class VpnProviderCreateConfigFunction : public VpnThreadExtensionFunction {
28 public:
29 DECLARE_EXTENSION_FUNCTION("vpnProvider.createConfig",
30 VPNPROVIDER_CREATECONFIG);
32 protected:
33 ~VpnProviderCreateConfigFunction() override;
35 ExtensionFunction::ResponseAction Run() override;
38 class VpnProviderDestroyConfigFunction : public VpnThreadExtensionFunction {
39 public:
40 DECLARE_EXTENSION_FUNCTION("vpnProvider.destroyConfig",
41 VPNPROVIDER_DESTROYCONFIG);
43 protected:
44 ~VpnProviderDestroyConfigFunction() override;
46 ExtensionFunction::ResponseAction Run() override;
49 class VpnProviderSetParametersFunction : public VpnThreadExtensionFunction {
50 public:
51 DECLARE_EXTENSION_FUNCTION("vpnProvider.setParameters",
52 VPNPROVIDER_SETPARAMETERS);
54 protected:
55 ~VpnProviderSetParametersFunction() override;
57 ExtensionFunction::ResponseAction Run() override;
60 class VpnProviderSendPacketFunction : public VpnThreadExtensionFunction {
61 public:
62 DECLARE_EXTENSION_FUNCTION("vpnProvider.sendPacket", VPNPROVIDER_SENDPACKET);
64 protected:
65 ~VpnProviderSendPacketFunction() override;
67 ExtensionFunction::ResponseAction Run() override;
70 class VpnProviderNotifyConnectionStateChangedFunction
71 : public VpnThreadExtensionFunction {
72 public:
73 DECLARE_EXTENSION_FUNCTION("vpnProvider.notifyConnectionStateChanged",
74 VPNPROVIDER_NOTIFYCONNECTIONSTATECHANGED);
76 protected:
77 ~VpnProviderNotifyConnectionStateChangedFunction() override;
79 ExtensionFunction::ResponseAction Run() override;
82 } // namespace extensions
84 #endif // CHROME_BROWSER_EXTENSIONS_API_VPN_PROVIDER_VPN_PROVIDER_API_H_