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

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

Issue 2831213002: Add unionpay resource for autofill. (Closed)
Patch Set: Created 3 years, 8 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 | « chrome/browser/android/resource_id.h ('k') | components/autofill/core/browser/credit_card.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 (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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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},
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 {"genericCC", IDR_AUTOFILL_CC_GENERIC}, 55 {"genericCC", IDR_AUTOFILL_CC_GENERIC},
56 {"jcbCC", IDR_AUTOFILL_CC_GENERIC}, 56 {"jcbCC", IDR_AUTOFILL_CC_GENERIC},
57 {"masterCardCC", IDR_AUTOFILL_CC_MASTERCARD}, 57 {"masterCardCC", IDR_AUTOFILL_CC_MASTERCARD},
58 {"mirCC", IDR_AUTOFILL_CC_MIR}, 58 {"mirCC", IDR_AUTOFILL_CC_MIR},
59 {"unionPayCC", IDR_AUTOFILL_CC_UNIONPAY},
59 {"visaCC", IDR_AUTOFILL_CC_VISA}, 60 {"visaCC", IDR_AUTOFILL_CC_VISA},
60 #if defined(OS_ANDROID) 61 #if defined(OS_ANDROID)
61 {"httpWarning", IDR_AUTOFILL_HTTP_WARNING}, 62 {"httpWarning", IDR_AUTOFILL_HTTP_WARNING},
62 {"httpsInvalid", IDR_AUTOFILL_HTTPS_INVALID_WARNING}, 63 {"httpsInvalid", IDR_AUTOFILL_HTTPS_INVALID_WARNING},
63 {"scanCreditCardIcon", IDR_AUTOFILL_CC_SCAN_NEW}, 64 {"scanCreditCardIcon", IDR_AUTOFILL_CC_SCAN_NEW},
64 {"settings", IDR_AUTOFILL_SETTINGS}, 65 {"settings", IDR_AUTOFILL_SETTINGS},
65 #endif 66 #endif
66 }; 67 };
67 68
68 int GetRowHeightFromId(int identifier) { 69 int GetRowHeightFromId(int identifier) {
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 bool AutofillPopupLayoutModel::IsIconAtStart(int frontend_id) const { 300 bool AutofillPopupLayoutModel::IsIconAtStart(int frontend_id) const {
300 return frontend_id == POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE || 301 return frontend_id == POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE ||
301 (is_credit_card_popup_ && IsIconInCreditCardPopupAtStart()); 302 (is_credit_card_popup_ && IsIconInCreditCardPopupAtStart());
302 } 303 }
303 304
304 unsigned int AutofillPopupLayoutModel::GetMargin() const { 305 unsigned int AutofillPopupLayoutModel::GetMargin() const {
305 return GetPopupMargin(); 306 return GetPopupMargin();
306 } 307 }
307 308
308 } // namespace autofill 309 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/android/resource_id.h ('k') | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698