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

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: pkasting feedback 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..5593bbaff83214e3a7557fc572b36979d9018c03 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 hovering this view should display a tooltip.
+ bool show_tooltip_;
+
LocationBarView* location_bar_;
DISALLOW_COPY_AND_ASSIGN(LocationIconView);
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/views/location_bar/location_icon_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698