OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PLATFORM_KEYS_PLATFORM_KEYS_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PLATFORM_KEYS_PLATFORM_KEYS_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_PLATFORM_KEYS_PLATFORM_KEYS_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_PLATFORM_KEYS_PLATFORM_KEYS_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 // Called when the certificates were selected. If an error occurred, |certs| | 40 // Called when the certificates were selected. If an error occurred, |certs| |
41 // will be null and instead |error_message| be set. | 41 // will be null and instead |error_message| be set. |
42 void OnSelectedCertificates(scoped_ptr<net::CertificateList> matches, | 42 void OnSelectedCertificates(scoped_ptr<net::CertificateList> matches, |
43 const std::string& error_message); | 43 const std::string& error_message); |
44 | 44 |
45 DECLARE_EXTENSION_FUNCTION("platformKeysInternal.selectClientCertificates", | 45 DECLARE_EXTENSION_FUNCTION("platformKeysInternal.selectClientCertificates", |
46 PLATFORMKEYSINTERNAL_SELECTCLIENTCERTIFICATES); | 46 PLATFORMKEYSINTERNAL_SELECTCLIENTCERTIFICATES); |
47 }; | 47 }; |
48 | 48 |
49 class PlatformKeysInternalGetPublicKeyFunction | |
50 : public ChromeUIThreadExtensionFunction { | |
51 private: | |
52 ~PlatformKeysInternalGetPublicKeyFunction() override; | |
53 ResponseAction Run() override; | |
54 | |
55 DECLARE_EXTENSION_FUNCTION("platformKeysInternal.getPublicKey", | |
56 PLATFORMKEYSINTERNAL_GETPUBLICKEY); | |
57 }; | |
58 | |
59 class PlatformKeysInternalSignFunction | 49 class PlatformKeysInternalSignFunction |
60 : public ChromeUIThreadExtensionFunction { | 50 : public ChromeUIThreadExtensionFunction { |
61 private: | 51 private: |
62 ~PlatformKeysInternalSignFunction() override; | 52 ~PlatformKeysInternalSignFunction() override; |
63 ResponseAction Run() override; | 53 ResponseAction Run() override; |
64 | 54 |
65 // Called when the signature was generated. If an error occurred, | 55 // Called when the signature was generated. If an error occurred, |
66 // |signature| will be empty and instead |error_message| be set. | 56 // |signature| will be empty and instead |error_message| be set. |
67 void OnSigned(const std::string& signature, const std::string& error_message); | 57 void OnSigned(const std::string& signature, const std::string& error_message); |
68 | 58 |
69 DECLARE_EXTENSION_FUNCTION("platformKeysInternal.sign", | 59 DECLARE_EXTENSION_FUNCTION("platformKeysInternal.sign", |
70 PLATFORMKEYSINTERNAL_SIGN); | 60 PLATFORMKEYSINTERNAL_SIGN); |
71 }; | 61 }; |
72 | 62 |
73 } // namespace extensions | 63 } // namespace extensions |
74 | 64 |
75 #endif // CHROME_BROWSER_EXTENSIONS_API_PLATFORM_KEYS_PLATFORM_KEYS_API_H_ | 65 #endif // CHROME_BROWSER_EXTENSIONS_API_PLATFORM_KEYS_PLATFORM_KEYS_API_H_ |
OLD | NEW |