OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |