| 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 26 matching lines...) Expand all Loading... |
| 37 const struct { | 37 const struct { |
| 38 const char* name; | 38 const char* name; |
| 39 int id; | 39 int id; |
| 40 } kDataResources[] = { | 40 } kDataResources[] = { |
| 41 {"americanExpressCC", IDR_AUTOFILL_CC_AMEX}, | 41 {"americanExpressCC", IDR_AUTOFILL_CC_AMEX}, |
| 42 {"dinersCC", IDR_AUTOFILL_CC_GENERIC}, | 42 {"dinersCC", IDR_AUTOFILL_CC_GENERIC}, |
| 43 {"discoverCC", IDR_AUTOFILL_CC_DISCOVER}, | 43 {"discoverCC", IDR_AUTOFILL_CC_DISCOVER}, |
| 44 {"genericCC", IDR_AUTOFILL_CC_GENERIC}, | 44 {"genericCC", IDR_AUTOFILL_CC_GENERIC}, |
| 45 {"jcbCC", IDR_AUTOFILL_CC_GENERIC}, | 45 {"jcbCC", IDR_AUTOFILL_CC_GENERIC}, |
| 46 {"masterCardCC", IDR_AUTOFILL_CC_MASTERCARD}, | 46 {"masterCardCC", IDR_AUTOFILL_CC_MASTERCARD}, |
| 47 {"mirCC", IDR_AUTOFILL_CC_MIR}, |
| 47 {"visaCC", IDR_AUTOFILL_CC_VISA}, | 48 {"visaCC", IDR_AUTOFILL_CC_VISA}, |
| 48 #if defined(OS_ANDROID) | 49 #if defined(OS_ANDROID) |
| 49 {"scanCreditCardIcon", IDR_AUTOFILL_CC_SCAN_NEW}, | 50 {"scanCreditCardIcon", IDR_AUTOFILL_CC_SCAN_NEW}, |
| 50 {"settings", IDR_AUTOFILL_SETTINGS}, | 51 {"settings", IDR_AUTOFILL_SETTINGS}, |
| 51 #endif | 52 #endif |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 int GetRowHeightFromId(int identifier) { | 55 int GetRowHeightFromId(int identifier) { |
| 55 if (identifier == POPUP_ITEM_ID_SEPARATOR) | 56 if (identifier == POPUP_ITEM_ID_SEPARATOR) |
| 56 return kSeparatorHeight; | 57 return kSeparatorHeight; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 #endif | 239 #endif |
| 239 | 240 |
| 240 return result; | 241 return result; |
| 241 } | 242 } |
| 242 | 243 |
| 243 const gfx::Rect AutofillPopupLayoutModel::RoundedElementBounds() const { | 244 const gfx::Rect AutofillPopupLayoutModel::RoundedElementBounds() const { |
| 244 return gfx::ToEnclosingRect(delegate_->element_bounds()); | 245 return gfx::ToEnclosingRect(delegate_->element_bounds()); |
| 245 } | 246 } |
| 246 | 247 |
| 247 } // namespace autofill | 248 } // namespace autofill |
| OLD | NEW |