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

Side by Side Diff: components/payments/content/payment_request_state.h

Issue 2766353004: [Payments] Support canMakePayment on Desktop (Closed)
Patch Set: 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
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 COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ 5 #ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_
6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 protected: 49 protected:
50 virtual ~Delegate() {} 50 virtual ~Delegate() {}
51 }; 51 };
52 52
53 PaymentRequestState(PaymentRequestSpec* spec, 53 PaymentRequestState(PaymentRequestSpec* spec,
54 Delegate* delegate, 54 Delegate* delegate,
55 const std::string& app_locale, 55 const std::string& app_locale,
56 autofill::PersonalDataManager* personal_data_manager); 56 autofill::PersonalDataManager* personal_data_manager);
57 ~PaymentRequestState() override; 57 ~PaymentRequestState() override;
58 58
59 // Returns whether the user has at least one instrument that satisfies the
60 // specified supported payment methods.
61 bool CanMakePayment();
please use gerrit instead 2017/03/24 14:47:25 This method should be const.
Mathieu 2017/03/24 15:38:41 Done.
59 void AddObserver(Observer* observer); 62 void AddObserver(Observer* observer);
60 void RemoveObserver(Observer* observer); 63 void RemoveObserver(Observer* observer);
61 64
62 // PaymentInstrument::Delegate: 65 // PaymentInstrument::Delegate:
63 void OnInstrumentDetailsReady( 66 void OnInstrumentDetailsReady(
64 const std::string& method_name, 67 const std::string& method_name,
65 const std::string& stringified_details) override; 68 const std::string& stringified_details) override;
66 void OnInstrumentDetailsError() override {} 69 void OnInstrumentDetailsError() override {}
67 70
68 // Initiates the generation of the PaymentResponse. Callers should check 71 // Initiates the generation of the PaymentResponse. Callers should check
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 std::vector<std::unique_ptr<PaymentInstrument>> available_instruments_; 172 std::vector<std::unique_ptr<PaymentInstrument>> available_instruments_;
170 173
171 base::ObserverList<Observer> observers_; 174 base::ObserverList<Observer> observers_;
172 175
173 DISALLOW_COPY_AND_ASSIGN(PaymentRequestState); 176 DISALLOW_COPY_AND_ASSIGN(PaymentRequestState);
174 }; 177 };
175 178
176 } // namespace payments 179 } // namespace payments
177 180
178 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ 181 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698