Turn addTransactionListener into transaction-updated event
This commit is contained in:
parent
ac6f895f64
commit
133bef3deb
5 changed files with 80 additions and 37 deletions
|
@ -16,7 +16,8 @@ namespace atom {
|
|||
|
||||
namespace api {
|
||||
|
||||
class InAppPurchase: public mate::EventEmitter<InAppPurchase> {
|
||||
class InAppPurchase: public mate::EventEmitter<InAppPurchase>,
|
||||
public in_app_purchase::TransactionObserver {
|
||||
public:
|
||||
static mate::Handle<InAppPurchase> Create(v8::Isolate* isolate);
|
||||
|
||||
|
@ -29,6 +30,11 @@ class InAppPurchase: public mate::EventEmitter<InAppPurchase> {
|
|||
|
||||
void PurchaseProduct(const std::string& product_id, mate::Arguments* args);
|
||||
|
||||
// TransactionObserver:
|
||||
void OnTransactionUpdated(
|
||||
const in_app_purchase::Payment& payment,
|
||||
const in_app_purchase::Transaction& transaction) override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(InAppPurchase);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue