OLD | NEW |
(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_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_AP
I_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_AP
I_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "chrome/browser/extensions/chrome_extension_function_details.h" |
| 13 #include "chrome/common/extensions/api/cryptotoken_private.h" |
| 14 #include "extensions/browser/extension_function.h" |
| 15 |
| 16 // Implementations for chrome.cryptotokenPrivate API functions. |
| 17 |
| 18 namespace infobars { |
| 19 class InfoBar; |
| 20 } |
| 21 |
| 22 namespace extensions { |
| 23 namespace api { |
| 24 |
| 25 class CryptotokenPrivateRequestPermissionFunction |
| 26 : public UIThreadExtensionFunction { |
| 27 public: |
| 28 CryptotokenPrivateRequestPermissionFunction(); |
| 29 DECLARE_EXTENSION_FUNCTION("cryptotokenPrivate.requestPermission", |
| 30 CRYPTOTOKENPRIVATE_REQUESTPERMISSION) |
| 31 protected: |
| 32 virtual ~CryptotokenPrivateRequestPermissionFunction() override {} |
| 33 virtual ResponseAction Run() override; |
| 34 |
| 35 private: |
| 36 ChromeExtensionFunctionDetails chrome_details_; |
| 37 |
| 38 void OnInfobarResponse(cryptotoken_private::PermissionResult result); |
| 39 }; |
| 40 |
| 41 } // namespace api |
| 42 } // namespace extensions |
| 43 |
| 44 #endif // CHROME_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE
_API_H_ |
OLD | NEW |