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

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

Issue 2680163007: Make the information icon in the account chooser consume the mouse click. (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/cocoa/passwords/account_chooser_view_controller.mm ('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 e6cf90406203128e4a23cc2cf7a25032709ad682..29fadaf297c23d5d3cb354c3bbbb9d2f4a6f5d58 100644
--- a/chrome/browser/ui/views/passwords/credentials_item_view.cc
+++ b/chrome/browser/ui/views/passwords/credentials_item_view.cc
@@ -59,6 +59,14 @@ void CircularImageView::OnPaint(gfx::Canvas* canvas) {
ImageView::OnPaint(canvas);
}
+// An ImageView that consumes the mouse events.
+class InfoImageView : public views::ImageView {
+ public:
+ // View:
+ bool OnMousePressed(const ui::MouseEvent& event) override { return true; }
+ bool OnMouseDragged(const ui::MouseEvent& event) override { return true; }
+};
+
} // namespace
CredentialsItemView::CredentialsItemView(
@@ -110,7 +118,7 @@ CredentialsItemView::CredentialsItemView(
}
if (form_->is_public_suffix_match) {
- info_icon_ = new views::ImageView;
+ info_icon_ = new InfoImageView;
info_icon_->SetImage(gfx::CreateVectorIcon(gfx::VectorIconId::INFO_OUTLINE,
kInfoIconSize,
gfx::kChromeIconGrey));
« no previous file with comments | « chrome/browser/ui/cocoa/passwords/account_chooser_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698