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 |
49 class PlatformKeysInternalSignFunction | 59 class PlatformKeysInternalSignFunction |
50 : public ChromeUIThreadExtensionFunction { | 60 : public ChromeUIThreadExtensionFunction { |
51 private: | 61 private: |
52 ~PlatformKeysInternalSignFunction() override; | 62 ~PlatformKeysInternalSignFunction() override; |
53 ResponseAction Run() override; | 63 ResponseAction Run() override; |
54 | 64 |
55 // Called when the signature was generated. If an error occurred, | 65 // Called when the signature was generated. If an error occurred, |
56 // |signature| will be empty and instead |error_message| be set. | 66 // |signature| will be empty and instead |error_message| be set. |
57 void OnSigned(const std::string& signature, const std::string& error_message); | 67 void OnSigned(const std::string& signature, const std::string& error_message); |
58 | 68 |
59 DECLARE_EXTENSION_FUNCTION("platformKeysInternal.sign", | 69 DECLARE_EXTENSION_FUNCTION("platformKeysInternal.sign", |
60 PLATFORMKEYSINTERNAL_SIGN); | 70 PLATFORMKEYSINTERNAL_SIGN); |
61 }; | 71 }; |
62 | 72 |
63 } // namespace extensions | 73 } // namespace extensions |
64 | 74 |
65 #endif // CHROME_BROWSER_EXTENSIONS_API_PLATFORM_KEYS_PLATFORM_KEYS_API_H_ | 75 #endif // CHROME_BROWSER_EXTENSIONS_API_PLATFORM_KEYS_PLATFORM_KEYS_API_H_ |
OLD | NEW |