OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AUTOFILL_BROWSER_WALLET_WALLET_ITEMS_H_ | 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_ITEMS_H_ |
6 #define COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_ITEMS_H_ | 6 #define COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_ITEMS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 const gfx::Image& CardIcon() const; | 82 const gfx::Image& CardIcon() const; |
83 | 83 |
84 // Returns a pair of strings that summarizes this CC, | 84 // Returns a pair of strings that summarizes this CC, |
85 // suitable for display to the user. | 85 // suitable for display to the user. |
86 string16 DisplayName() const; | 86 string16 DisplayName() const; |
87 string16 DisplayNameDetail() const; | 87 string16 DisplayNameDetail() const; |
88 | 88 |
89 // Gets info that corresponds with |type|. | 89 // Gets info that corresponds with |type|. |
90 string16 GetInfo(AutofillFieldType type) const; | 90 string16 GetInfo(AutofillFieldType type) const; |
91 | 91 |
| 92 // Returns the display type of the and last for digits (e.g. Visa - 4444). |
| 93 string16 TypeAndLastFourDigits() const; |
| 94 |
92 const string16& descriptive_name() const { return descriptive_name_; } | 95 const string16& descriptive_name() const { return descriptive_name_; } |
93 const Type& type() const { return type_; } | 96 const Type& type() const { return type_; } |
94 const std::vector<string16>& supported_currencies() const { | 97 const std::vector<string16>& supported_currencies() const { |
95 return supported_currencies_; | 98 return supported_currencies_; |
96 } | 99 } |
97 const string16& last_four_digits() const { return last_four_digits_; } | 100 const string16& last_four_digits() const { return last_four_digits_; } |
98 int expiration_month() const { return expiration_month_; } | 101 int expiration_month() const { return expiration_month_; } |
99 int expiration_year() const { return expiration_year_; } | 102 int expiration_year() const { return expiration_year_; } |
100 const Address& address() const { return *address_; } | 103 const Address& address() const { return *address_; } |
101 const Status& status() const { return status_; } | 104 const Status& status() const { return status_; } |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 } | 206 } |
204 void AddAddress(scoped_ptr<Address> address) { | 207 void AddAddress(scoped_ptr<Address> address) { |
205 DCHECK(address.get()); | 208 DCHECK(address.get()); |
206 addresses_.push_back(address.release()); | 209 addresses_.push_back(address.release()); |
207 } | 210 } |
208 void AddLegalDocument(scoped_ptr<LegalDocument> legal_document) { | 211 void AddLegalDocument(scoped_ptr<LegalDocument> legal_document) { |
209 DCHECK(legal_document.get()); | 212 DCHECK(legal_document.get()); |
210 legal_documents_.push_back(legal_document.release()); | 213 legal_documents_.push_back(legal_document.release()); |
211 } | 214 } |
212 | 215 |
| 216 // Return the corresponding instrument for |id| or NULL if it doesn't exist. |
| 217 const WalletItems::MaskedInstrument* GetInstrumentById( |
| 218 const std::string& object_id) const; |
| 219 |
213 // Whether or not |action| is in |required_actions_|. | 220 // Whether or not |action| is in |required_actions_|. |
214 bool HasRequiredAction(RequiredAction action) const; | 221 bool HasRequiredAction(RequiredAction action) const; |
215 | 222 |
216 const std::vector<RequiredAction>& required_actions() const { | 223 const std::vector<RequiredAction>& required_actions() const { |
217 return required_actions_; | 224 return required_actions_; |
218 } | 225 } |
219 const std::string& google_transaction_id() const { | 226 const std::string& google_transaction_id() const { |
220 return google_transaction_id_; | 227 return google_transaction_id_; |
221 } | 228 } |
222 const std::vector<MaskedInstrument*>& instruments() const { | 229 const std::vector<MaskedInstrument*>& instruments() const { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // Legal documents the user must accept before using Online Wallet. | 277 // Legal documents the user must accept before using Online Wallet. |
271 ScopedVector<LegalDocument> legal_documents_; | 278 ScopedVector<LegalDocument> legal_documents_; |
272 | 279 |
273 DISALLOW_COPY_AND_ASSIGN(WalletItems); | 280 DISALLOW_COPY_AND_ASSIGN(WalletItems); |
274 }; | 281 }; |
275 | 282 |
276 } // namespace wallet | 283 } // namespace wallet |
277 } // namespace autofill | 284 } // namespace autofill |
278 | 285 |
279 #endif // COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_ITEMS_H_ | 286 #endif // COMPONENTS_AUTOFILL_BROWSER_WALLET_WALLET_ITEMS_H_ |
OLD | NEW |