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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 // Autofill values have positive |frontend_id|. | 153 // Autofill values have positive |frontend_id|. |
154 if (suggestions[index].frontend_id > 0) | 154 if (suggestions[index].frontend_id > 0) |
155 return bold_font_list_; | 155 return bold_font_list_; |
156 | 156 |
157 // All other message types are defined here. | 157 // All other message types are defined here. |
158 PopupItemId id = static_cast<PopupItemId>(suggestions[index].frontend_id); | 158 PopupItemId id = static_cast<PopupItemId>(suggestions[index].frontend_id); |
159 switch (id) { | 159 switch (id) { |
160 case POPUP_ITEM_ID_WARNING_MESSAGE: | 160 case POPUP_ITEM_ID_WARNING_MESSAGE: |
161 return warning_font_list_; | 161 return warning_font_list_; |
| 162 case POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE: |
162 case POPUP_ITEM_ID_CLEAR_FORM: | 163 case POPUP_ITEM_ID_CLEAR_FORM: |
163 case POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO: | 164 case POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO: |
164 case POPUP_ITEM_ID_AUTOFILL_OPTIONS: | 165 case POPUP_ITEM_ID_AUTOFILL_OPTIONS: |
165 case POPUP_ITEM_ID_SCAN_CREDIT_CARD: | 166 case POPUP_ITEM_ID_SCAN_CREDIT_CARD: |
166 case POPUP_ITEM_ID_SEPARATOR: | 167 case POPUP_ITEM_ID_SEPARATOR: |
167 return normal_font_list_; | 168 return normal_font_list_; |
168 case POPUP_ITEM_ID_TITLE: | 169 case POPUP_ITEM_ID_TITLE: |
169 case POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY: | 170 case POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY: |
170 case POPUP_ITEM_ID_DATALIST_ENTRY: | 171 case POPUP_ITEM_ID_DATALIST_ENTRY: |
171 case POPUP_ITEM_ID_PASSWORD_ENTRY: | 172 case POPUP_ITEM_ID_PASSWORD_ENTRY: |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 #endif | 225 #endif |
225 | 226 |
226 return result; | 227 return result; |
227 } | 228 } |
228 | 229 |
229 const gfx::Rect AutofillPopupLayoutModel::RoundedElementBounds() const { | 230 const gfx::Rect AutofillPopupLayoutModel::RoundedElementBounds() const { |
230 return gfx::ToEnclosingRect(delegate_->element_bounds()); | 231 return gfx::ToEnclosingRect(delegate_->element_bounds()); |
231 } | 232 } |
232 | 233 |
233 } // namespace autofill | 234 } // namespace autofill |
OLD | NEW |