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

Unified Diff: chrome/browser/ui/views/location_bar/location_icon_view.h

Issue 1627543002: Anchor the infobar arrow to the LocationIconView correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 4 years, 11 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/location_icon_view.h
diff --git a/chrome/browser/ui/views/location_bar/location_icon_view.h b/chrome/browser/ui/views/location_bar/location_icon_view.h
index 65dabff8dede137a972cbdabe0296c63d982e379..f4840e9bfc07726f5307398504ade47cd2ed61b9 100644
--- a/chrome/browser/ui/views/location_bar/location_icon_view.h
+++ b/chrome/browser/ui/views/location_bar/location_icon_view.h
@@ -33,11 +33,13 @@ class LocationIconView : public IconLabelBubbleView {
bool OnKeyPressed(const ui::KeyEvent& event) override;
bool OnKeyReleased(const ui::KeyEvent& event) override;
void OnGestureEvent(ui::GestureEvent* event) override;
+ bool GetTooltipText(const gfx::Point& p,
+ base::string16* tooltip) const override;
SkColor GetTextColor() const override;
SkColor GetBorderColor() const override;
// Whether we should show the tooltip for this icon or not.
- void ShowTooltip(bool show);
+ void set_show_tooltip(bool show_tooltip) { show_tooltip_ = show_tooltip; }
// Returns what the minimum size would be if the label text were |text|.
gfx::Size GetMinimumSizeForLabelText(const base::string16& text) const;
@@ -64,6 +66,9 @@ class LocationIconView : public IconLabelBubbleView {
// clicking the icon repeatedly will appear to toggle the bubble on and off.
bool suppress_mouse_released_action_;
+ // True if |this| currently displays a tooltip.
Peter Kasting 2016/01/23 00:13:41 Nit: How about "True if hovering this view should
Evan Stade 2016/01/25 23:13:33 Done.
+ bool show_tooltip_;
+
LocationBarView* location_bar_;
DISALLOW_COPY_AND_ASSIGN(LocationIconView);

Powered by Google App Engine
This is Rietveld 408576698