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

Side by Side Diff: chrome/browser/payments/chrome_payment_request_delegate.h

Issue 2715213005: [Payments] Add the pay button, and control its enabled state (Closed)
Patch Set: addressed comments Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/payments/chrome_payment_request_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PAYMENTS_CHROME_PAYMENT_REQUEST_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_PAYMENTS_CHROME_PAYMENT_REQUEST_DELEGATE_H_
6 #define CHROME_BROWSER_PAYMENTS_CHROME_PAYMENT_REQUEST_DELEGATE_H_ 6 #define CHROME_BROWSER_PAYMENTS_CHROME_PAYMENT_REQUEST_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/payments/content/payment_request_delegate.h" 9 #include "components/payments/content/payment_request_delegate.h"
10 10
11 namespace content { 11 namespace content {
12 class WebContents; 12 class WebContents;
13 } 13 }
14 14
15 namespace payments { 15 namespace payments {
16 16
17 class PaymentRequest; 17 class PaymentRequest;
18 class PaymentRequestDialog; 18 class PaymentRequestDialog;
19 19
20 class ChromePaymentRequestDelegate : public PaymentRequestDelegate { 20 class ChromePaymentRequestDelegate : public PaymentRequestDelegate {
21 public: 21 public:
22 explicit ChromePaymentRequestDelegate(content::WebContents* web_contents); 22 explicit ChromePaymentRequestDelegate(content::WebContents* web_contents);
23 ~ChromePaymentRequestDelegate() override {} 23 ~ChromePaymentRequestDelegate() override {}
24 24
25 void ShowDialog(PaymentRequest* request) override; 25 void ShowDialog(PaymentRequest* request) override;
26 void CloseDialog() override; 26 void CloseDialog() override;
27 autofill::PersonalDataManager* GetPersonalDataManager() override; 27 autofill::PersonalDataManager* GetPersonalDataManager() override;
28 const std::string& GetApplicationLocale() const override;
28 29
29 protected: 30 protected:
30 // Reference to the dialog so that we can satisfy calls to CloseDialog(). This 31 // 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 // reference is invalid once CloseDialog() has been called on it, because the
32 // dialog will be destroyed. Protected for testing. 33 // dialog will be destroyed. Protected for testing.
33 PaymentRequestDialog* dialog_; 34 PaymentRequestDialog* dialog_;
34 35
35 private: 36 private:
36 // Not owned but outlives the PaymentRequest object that owns this. 37 // Not owned but outlives the PaymentRequest object that owns this.
37 content::WebContents* web_contents_; 38 content::WebContents* web_contents_;
38 39
39 DISALLOW_COPY_AND_ASSIGN(ChromePaymentRequestDelegate); 40 DISALLOW_COPY_AND_ASSIGN(ChromePaymentRequestDelegate);
40 }; 41 };
41 42
42 } // namespace payments 43 } // namespace payments
43 44
44 #endif // CHROME_BROWSER_PAYMENTS_CHROME_PAYMENT_REQUEST_DELEGATE_H_ 45 #endif // CHROME_BROWSER_PAYMENTS_CHROME_PAYMENT_REQUEST_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/payments/chrome_payment_request_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698