feat: promisify In-App Purchase (#17355)
* feat: promisify In-App Purchase * use mate::Arguments in GetProducts
This commit is contained in:
parent
faabd0cc8b
commit
3e5a98b5f4
11 changed files with 113 additions and 46 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "atom/browser/mac/in_app_purchase.h"
|
||||
#include "atom/browser/mac/in_app_purchase_observer.h"
|
||||
#include "atom/browser/mac/in_app_purchase_product.h"
|
||||
#include "atom/common/promise_util.h"
|
||||
#include "native_mate/handle.h"
|
||||
|
||||
namespace atom {
|
||||
|
@ -30,7 +31,11 @@ class InAppPurchase : public mate::EventEmitter<InAppPurchase>,
|
|||
explicit InAppPurchase(v8::Isolate* isolate);
|
||||
~InAppPurchase() override;
|
||||
|
||||
void PurchaseProduct(const std::string& product_id, mate::Arguments* args);
|
||||
v8::Local<v8::Promise> PurchaseProduct(const std::string& product_id,
|
||||
mate::Arguments* args);
|
||||
|
||||
v8::Local<v8::Promise> GetProducts(const std::vector<std::string>& productIDs,
|
||||
mate::Arguments* args);
|
||||
|
||||
// TransactionObserver:
|
||||
void OnTransactionsUpdated(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue