Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h

Issue 391513002: Add easyUnlockPrivate extension API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP I_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE_AP I_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "extensions/browser/extension_function.h"
12
13 // Implementations for chrome.easyUnlockPrivate API functions.
14
15 namespace extensions {
16 namespace api {
17
18 class EasyUnlockPrivatePerformECDHKeyAgreementFunction
19 : public AsyncExtensionFunction {
20 public:
21 EasyUnlockPrivatePerformECDHKeyAgreementFunction();
22
23 protected:
24 virtual ~EasyUnlockPrivatePerformECDHKeyAgreementFunction();
25
26 virtual bool RunAsync() OVERRIDE;
27
28 private:
29 void OnData(const std::string& secret_key);
30
31 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.performECDHKeyAgreement",
32 EASYUNLOCKPRIVATE_PERFORMECDHKEYAGREEMENT)
33 };
34
35 class EasyUnlockPrivateGenerateEcP256KeyPairFunction
36 : public AsyncExtensionFunction {
37 public:
38 EasyUnlockPrivateGenerateEcP256KeyPairFunction();
39
40 protected:
41 virtual ~EasyUnlockPrivateGenerateEcP256KeyPairFunction();
42
43 virtual bool RunAsync() OVERRIDE;
44
45 private:
46 void OnData(const std::string& public_key,
47 const std::string& private_key);
48
49 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.generateEcP256KeyPair",
50 EASYUNLOCKPRIVATE_GENERATEECP256KEYPAIR)
51 };
52
53 class EasyUnlockPrivateCreateSecureMessageFunction
54 : public AsyncExtensionFunction {
55 public:
56 EasyUnlockPrivateCreateSecureMessageFunction();
57
58 protected:
59 virtual ~EasyUnlockPrivateCreateSecureMessageFunction();
60
61 virtual bool RunAsync() OVERRIDE;
62
63 private:
64 void OnData(const std::string& message);
65
66 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.createSecureMessage",
67 EASYUNLOCKPRIVATE_CREATESECUREMESSAGE)
68 };
69
70 class EasyUnlockPrivateUnwrapSecureMessageFunction
71 : public AsyncExtensionFunction {
72 public:
73 EasyUnlockPrivateUnwrapSecureMessageFunction();
74
75 protected:
76 virtual ~EasyUnlockPrivateUnwrapSecureMessageFunction();
77
78 virtual bool RunAsync() OVERRIDE;
79
80 private:
81 void OnData(const std::string& data);
82
83 DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.unwrapSecureMessage",
84 EASYUNLOCKPRIVATE_UNWRAPSECUREMESSAGE)
85 };
86
87 } // namespace api
88 } // namespace extensions
89
90 #endif // CHROME_BROWSER_EXTENSIONS_API_EASY_UNLOCK_PRIVATE_EASY_UNLOCK_PRIVATE _API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698