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

Unified Diff: chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc

Issue 1886943002: Change ContentSettingImageView activation to key release (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sharing is caring Created 4 years, 8 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/views/location_bar/icon_label_bubble_view.cc
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
index 9612757b62992884acd66ceff2c40035b91b39ec..67c376a36ef63f1191553e32087da0ae13ec0315 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
@@ -119,11 +119,21 @@ bool IconLabelBubbleView::IsShrinking() const {
return false;
}
+bool IconLabelBubbleView::OnActivate() {
+ return false;
+}
+
gfx::Size IconLabelBubbleView::GetPreferredSize() const {
// Height will be ignored by the LocationBarView.
return GetSizeForLabelWidth(label_->GetPreferredSize().width());
}
+bool IconLabelBubbleView::OnKeyReleased(const ui::KeyEvent& event) {
+ if (event.key_code() != ui::VKEY_RETURN && event.key_code() != ui::VKEY_SPACE)
msw 2016/04/20 23:57:55 nit: invert conditional to nest OnActivate?
Evan Stade 2016/04/24 17:45:26 I could see it going either way, but in the intere
+ return false;
+ return OnActivate();
+}
+
void IconLabelBubbleView::Layout() {
// Compute the image bounds. In non-MD, the leading padding depends on
// whether this is an extension icon, since extension icons and

Powered by Google App Engine
This is Rietveld 408576698