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

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

Issue 2496683003: Http Bad: Add a PopupItemId to identify http warning message (Closed)
Patch Set: minor change Created 4 years, 1 month 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698