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

Side by Side Diff: chrome/browser/ui/autofill/autofill_popup_layout_model.cc

Issue 2906763005: Add support for Brazil Elo card in autofill. (Closed)
Patch Set: Created 3 years, 6 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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 #include "chrome/browser/ui/autofill/autofill_popup_layout_model.h" 5 #include "chrome/browser/ui/autofill/autofill_popup_layout_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Size difference between the normal font and the smaller font, in pixels. 42 // Size difference between the normal font and the smaller font, in pixels.
43 const int kSmallerFontSizeDelta = -1; 43 const int kSmallerFontSizeDelta = -1;
44 44
45 const int kHttpWarningIconWidth = 16; 45 const int kHttpWarningIconWidth = 16;
46 #endif 46 #endif
47 47
48 const struct { 48 const struct {
49 const char* name; 49 const char* name;
50 int id; 50 int id;
51 } kDataResources[] = { 51 } kDataResources[] = {
52 {"americanExpressCC", IDR_AUTOFILL_CC_AMEX}, 52 {"americanExpressCC", IDR_AUTOFILL_CC_AMEX},
Mathieu 2017/05/26 13:48:32 let's use the constants from CreditCard i.e. kAmer
jiahuiguo 2017/05/26 19:44:10 Done.
53 {"dinersCC", IDR_AUTOFILL_CC_GENERIC}, 53 {"dinersCC", IDR_AUTOFILL_CC_GENERIC},
54 {"discoverCC", IDR_AUTOFILL_CC_DISCOVER}, 54 {"discoverCC", IDR_AUTOFILL_CC_DISCOVER},
55 {"eloCC", IDR_AUTOFILL_CC_ELO},
55 {"genericCC", IDR_AUTOFILL_CC_GENERIC}, 56 {"genericCC", IDR_AUTOFILL_CC_GENERIC},
56 {"jcbCC", IDR_AUTOFILL_CC_GENERIC}, 57 {"jcbCC", IDR_AUTOFILL_CC_GENERIC},
57 {"masterCardCC", IDR_AUTOFILL_CC_MASTERCARD}, 58 {"masterCardCC", IDR_AUTOFILL_CC_MASTERCARD},
58 {"mirCC", IDR_AUTOFILL_CC_MIR}, 59 {"mirCC", IDR_AUTOFILL_CC_MIR},
59 {"unionPayCC", IDR_AUTOFILL_CC_UNIONPAY}, 60 {"unionPayCC", IDR_AUTOFILL_CC_UNIONPAY},
60 {"visaCC", IDR_AUTOFILL_CC_VISA}, 61 {"visaCC", IDR_AUTOFILL_CC_VISA},
61 #if defined(OS_ANDROID) 62 #if defined(OS_ANDROID)
62 {"httpWarning", IDR_AUTOFILL_HTTP_WARNING}, 63 {"httpWarning", IDR_AUTOFILL_HTTP_WARNING},
63 {"httpsInvalid", IDR_AUTOFILL_HTTPS_INVALID_WARNING}, 64 {"httpsInvalid", IDR_AUTOFILL_HTTPS_INVALID_WARNING},
64 {"scanCreditCardIcon", IDR_AUTOFILL_CC_SCAN_NEW}, 65 {"scanCreditCardIcon", IDR_AUTOFILL_CC_SCAN_NEW},
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 bool AutofillPopupLayoutModel::IsIconAtStart(int frontend_id) const { 303 bool AutofillPopupLayoutModel::IsIconAtStart(int frontend_id) const {
303 return frontend_id == POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE || 304 return frontend_id == POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE ||
304 (is_credit_card_popup_ && IsIconInCreditCardPopupAtStart()); 305 (is_credit_card_popup_ && IsIconInCreditCardPopupAtStart());
305 } 306 }
306 307
307 unsigned int AutofillPopupLayoutModel::GetMargin() const { 308 unsigned int AutofillPopupLayoutModel::GetMargin() const {
308 return GetPopupMargin(); 309 return GetPopupMargin();
309 } 310 }
310 311
311 } // namespace autofill 312 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698