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

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

Issue 2498503002: Http Bad: Add icons to the http warning message (Closed)
Patch Set: 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 26 matching lines...) Expand all
37 const char* name; 37 const char* name;
38 int id; 38 int id;
39 } kDataResources[] = { 39 } kDataResources[] = {
40 {"americanExpressCC", IDR_AUTOFILL_CC_AMEX}, 40 {"americanExpressCC", IDR_AUTOFILL_CC_AMEX},
41 {"dinersCC", IDR_AUTOFILL_CC_GENERIC}, 41 {"dinersCC", IDR_AUTOFILL_CC_GENERIC},
42 {"discoverCC", IDR_AUTOFILL_CC_DISCOVER}, 42 {"discoverCC", IDR_AUTOFILL_CC_DISCOVER},
43 {"genericCC", IDR_AUTOFILL_CC_GENERIC}, 43 {"genericCC", IDR_AUTOFILL_CC_GENERIC},
44 {"jcbCC", IDR_AUTOFILL_CC_GENERIC}, 44 {"jcbCC", IDR_AUTOFILL_CC_GENERIC},
45 {"masterCardCC", IDR_AUTOFILL_CC_MASTERCARD}, 45 {"masterCardCC", IDR_AUTOFILL_CC_MASTERCARD},
46 {"visaCC", IDR_AUTOFILL_CC_VISA}, 46 {"visaCC", IDR_AUTOFILL_CC_VISA},
47 {"http", IDR_AUTOFILL_HTTP_WARNING},
48 {"httpsInvalid", IDR_AUTOFILL_HTTPS_INVALID_WARNING},
47 #if defined(OS_ANDROID) 49 #if defined(OS_ANDROID)
48 {"scanCreditCardIcon", IDR_AUTOFILL_CC_SCAN_NEW}, 50 {"scanCreditCardIcon", IDR_AUTOFILL_CC_SCAN_NEW},
49 {"settings", IDR_AUTOFILL_SETTINGS}, 51 {"settings", IDR_AUTOFILL_SETTINGS},
50 #endif 52 #endif
51 }; 53 };
52 54
53 int GetRowHeightFromId(int identifier) { 55 int GetRowHeightFromId(int identifier) {
54 if (identifier == POPUP_ITEM_ID_SEPARATOR) 56 if (identifier == POPUP_ITEM_ID_SEPARATOR)
55 return kSeparatorHeight; 57 return kSeparatorHeight;
56 58
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 #endif 239 #endif
238 240
239 return result; 241 return result;
240 } 242 }
241 243
242 const gfx::Rect AutofillPopupLayoutModel::RoundedElementBounds() const { 244 const gfx::Rect AutofillPopupLayoutModel::RoundedElementBounds() const {
243 return gfx::ToEnclosingRect(delegate_->element_bounds()); 245 return gfx::ToEnclosingRect(delegate_->element_bounds());
244 } 246 }
245 247
246 } // namespace autofill 248 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698