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

Unified Diff: chrome/browser/ui/views/passwords/credentials_item_view.cc

Issue 2684343006: Make the account chooser and CVC dialog use the same icon with toolip for Views. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « chrome/browser/ui/views/autofill/tooltip_icon.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/passwords/credentials_item_view.cc
diff --git a/chrome/browser/ui/views/passwords/credentials_item_view.cc b/chrome/browser/ui/views/passwords/credentials_item_view.cc
index 29fadaf297c23d5d3cb354c3bbbb9d2f4a6f5d58..1d31dd323340c8489cb518598493940da571be9e 100644
--- a/chrome/browser/ui/views/passwords/credentials_item_view.cc
+++ b/chrome/browser/ui/views/passwords/credentials_item_view.cc
@@ -7,16 +7,13 @@
#include "base/macros.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
+#include "chrome/browser/ui/views/autofill/tooltip_icon.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
#include "components/autofill/core/common/password_form.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
-#include "ui/gfx/color_palette.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/path.h"
-#include "ui/gfx/vector_icons_public.h"
#include "ui/views/border.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
@@ -60,8 +57,9 @@ void CircularImageView::OnPaint(gfx::Canvas* canvas) {
}
// An ImageView that consumes the mouse events.
-class InfoImageView : public views::ImageView {
+class InfoImageView : public autofill::TooltipIcon {
public:
+ using TooltipIcon::TooltipIcon;
// View:
bool OnMousePressed(const ui::MouseEvent& event) override { return true; }
bool OnMouseDragged(const ui::MouseEvent& event) override { return true; }
@@ -118,12 +116,8 @@ CredentialsItemView::CredentialsItemView(
}
if (form_->is_public_suffix_match) {
- info_icon_ = new InfoImageView;
- info_icon_->SetImage(gfx::CreateVectorIcon(gfx::VectorIconId::INFO_OUTLINE,
- kInfoIconSize,
- gfx::kChromeIconGrey));
- info_icon_->SetTooltipText(
- base::UTF8ToUTF16(form_->origin.GetOrigin().spec()));
+ info_icon_ =
+ new InfoImageView(base::UTF8ToUTF16(form_->origin.GetOrigin().spec()));
AddChildView(info_icon_);
}
« no previous file with comments | « chrome/browser/ui/views/autofill/tooltip_icon.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698