1 // Copyright 2017 Samsung Electronics Inc. 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.
5 #ifndef PAYMENT_REQUEST_DELEGATE_EFL_H_
6 #define PAYMENT_REQUEST_DELEGATE_EFL_H_
8 #include "base/macros.h"
9 #include "components/payments/payment_request_delegate.h"
18 class PaymentRequestDialog;
20 class PaymentRequestDelegateEfl : public PaymentRequestDelegate {
22 explicit PaymentRequestDelegateEfl(content::WebContents* web_contents);
23 ~PaymentRequestDelegateEfl() override {}
25 void ShowDialog(PaymentRequest* request) override;
26 void CloseDialog() override;
27 autofill::PersonalDataManager* GetPersonalDataManager() override;
30 // Reference to the dialog so that we can satisfy calls to CloseDialog(). This
31 // reference is invalid once CloseDialog() has been called on it, because the
32 // dialog will be destroyed. Protected for testing.
33 PaymentRequestDialog* dialog_;
36 // Not owned but outlives the PaymentRequest object that owns this.
37 content::WebContents* web_contents_;
39 DISALLOW_COPY_AND_ASSIGN(PaymentRequestDelegateEfl);
42 } // namespace payments
44 #endif // PAYMENT_REQUEST_DELEGATE_EFL_H_