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

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

Issue 2203963002: [Autofill] Credit Card Signin promo: no bg color, no smaller font. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed kWarningTextColor Created 4 years, 4 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
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_CLEAR_FORM: 162 case POPUP_ITEM_ID_CLEAR_FORM:
163 case POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO:
163 case POPUP_ITEM_ID_AUTOFILL_OPTIONS: 164 case POPUP_ITEM_ID_AUTOFILL_OPTIONS:
164 case POPUP_ITEM_ID_SCAN_CREDIT_CARD: 165 case POPUP_ITEM_ID_SCAN_CREDIT_CARD:
165 case POPUP_ITEM_ID_SEPARATOR: 166 case POPUP_ITEM_ID_SEPARATOR:
166 return normal_font_list_; 167 return normal_font_list_;
167 case POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO:
168 return smaller_font_list_;
169 case POPUP_ITEM_ID_TITLE: 168 case POPUP_ITEM_ID_TITLE:
170 case POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY: 169 case POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY:
171 case POPUP_ITEM_ID_DATALIST_ENTRY: 170 case POPUP_ITEM_ID_DATALIST_ENTRY:
172 case POPUP_ITEM_ID_PASSWORD_ENTRY: 171 case POPUP_ITEM_ID_PASSWORD_ENTRY:
173 return bold_font_list_; 172 return bold_font_list_;
174 } 173 }
175 NOTREACHED(); 174 NOTREACHED();
176 return normal_font_list_; 175 return normal_font_list_;
177 } 176 }
178 177
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 #endif 224 #endif
226 225
227 return result; 226 return result;
228 } 227 }
229 228
230 const gfx::Rect AutofillPopupLayoutModel::RoundedElementBounds() const { 229 const gfx::Rect AutofillPopupLayoutModel::RoundedElementBounds() const {
231 return gfx::ToEnclosingRect(delegate_->element_bounds()); 230 return gfx::ToEnclosingRect(delegate_->element_bounds());
232 } 231 }
233 232
234 } // namespace autofill 233 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_impl.cc ('k') | chrome/browser/ui/autofill/popup_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698