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

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

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
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_icon_view.h ('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/location_bar/location_icon_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_icon_view.cc b/chrome/browser/ui/views/location_bar/location_icon_view.cc
index 7524f324305dad52ced9bad7d06498f3c43bcf29..fd2431d80fab59bb8416415c0a7f781880e9e64e 100644
--- a/chrome/browser/ui/views/location_bar/location_icon_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_icon_view.cc
@@ -118,6 +118,13 @@ void LocationIconView::OnGestureEvent(ui::GestureEvent* event) {
event->SetHandled();
}
+bool LocationIconView::GetTooltipText(const gfx::Point& p,
+ base::string16* tooltip) const {
+ if (show_tooltip_)
+ *tooltip = l10n_util::GetStringUTF16(IDS_TOOLTIP_LOCATION_ICON);
+ return show_tooltip_;
+}
+
void LocationIconView::OnClickOrTap(const ui::LocatedEvent& event) {
// Do not show page info if the user has been editing the location bar or the
// location bar is at the NTP.
@@ -126,11 +133,6 @@ void LocationIconView::OnClickOrTap(const ui::LocatedEvent& event) {
ProcessEvent(event);
}
-void LocationIconView::ShowTooltip(bool show) {
- SetTooltipText(show ?
- l10n_util::GetStringUTF16(IDS_TOOLTIP_LOCATION_ICON) : base::string16());
-}
-
void LocationIconView::ProcessEvent(const ui::LocatedEvent& event) {
if (!HitTestPoint(event.location()))
return;
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_icon_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698