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

Unified Diff: chrome/browser/ui/autofill/autofill_popup_layout_model.cc

Issue 2971783002: Skeleton for showing "Show all saved passwords row" for Linux/CrOs/Windows platforms (Closed)
Patch Set: more comments adaressed Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/autofill/autofill_popup_layout_model.cc
diff --git a/chrome/browser/ui/autofill/autofill_popup_layout_model.cc b/chrome/browser/ui/autofill/autofill_popup_layout_model.cc
index 385d472d25dcc03c910ac86ecd1555f3c2568b6d..44ef7e9c548d65aab0d40e9fead9320a68e537a6 100644
--- a/chrome/browser/ui/autofill/autofill_popup_layout_model.cc
+++ b/chrome/browser/ui/autofill/autofill_popup_layout_model.cc
@@ -26,6 +26,7 @@
#include "ui/gfx/paint_vector_icon.h"
#if !defined(OS_ANDROID)
+#include "chrome/app/vector_icons/vector_icons.h"
#include "components/toolbar/vector_icons.h" // nogncheck
#endif
@@ -133,7 +134,7 @@ int AutofillPopupLayoutModel::RowWidthWithoutText(int row,
const base::string16& icon = suggestions[row].icon;
if (!icon.empty()) {
row_size += GetIconImage(row).width() +
- (is_warning_message ? kHttpWarningIconPadding : kIconPadding);
+ (is_warning_message ? kRightHandSideIconPapping : kIconPadding);
vasilii 2017/07/06 15:15:21 Isn't it applicable to the new state too? It seems
melandory 2017/07/07 12:26:31 Done.
}
// Add the padding at the end.
@@ -180,6 +181,7 @@ const gfx::FontList& AutofillPopupLayoutModel::GetValueFontListForRow(
case POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE:
case POPUP_ITEM_ID_TITLE:
case POPUP_ITEM_ID_PASSWORD_ENTRY:
+ case POPUP_ITEM_ID_ALL_SAVED_PASSWORDS_ENTRY:
return normal_font_list_;
case POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY:
case POPUP_ITEM_ID_DATALIST_ENTRY:
@@ -230,6 +232,11 @@ gfx::ImageSkia AutofillPopupLayoutModel::GetIconImage(size_t index) const {
kHttpWarningIconWidth, gfx::kGoogleRed700);
}
+ if (icon_str == base::ASCIIToUTF16("showAllSavedPasswords")) {
+ return gfx::CreateVectorIcon(kShowAllSavedPasswordsIcon,
+ kHttpWarningIconWidth, gfx::kChromeIconGrey);
+ }
+
// For other suggestion entries, get icon from PNG files.
int icon_id = GetIconResourceID(icon_str);
DCHECK_NE(-1, icon_id);

Powered by Google App Engine
This is Rietveld 408576698