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

Unified Diff: ash/system/tray/hover_highlight_view.cc

Issue 1466393002: Support tooltip for HoverHighlightView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: ash/system/tray/hover_highlight_view.cc
diff --git a/ash/system/tray/hover_highlight_view.cc b/ash/system/tray/hover_highlight_view.cc
index 164cb41e3c0c7c07454f048212703a2ac410555a..6a565bac948f455219d15c988348b80caf944723 100644
--- a/ash/system/tray/hover_highlight_view.cc
+++ b/ash/system/tray/hover_highlight_view.cc
@@ -240,4 +240,18 @@ void HoverHighlightView::OnFocus() {
ActionableView::OnFocus();
}
+bool HoverHighlightView::GetTooltipText(const gfx::Point& p,
+ base::string16* tooltip) const {
+ if (tooltip_.length()) {
+ *tooltip = tooltip_;
+ return true;
+ } else {
+ return false;
+ }
stevenjb 2015/11/23 20:26:24 if (tooltip_.empty()) return false; tooltip = to
fqj 2015/11/23 20:39:03 Done.
+}
+
+void HoverHighlightView::SetTooltipText(const base::string16& tooltip) {
+ tooltip_ = tooltip;
+}
stevenjb 2015/11/23 20:26:24 Trivial setters like this should be inlined in the
fqj 2015/11/23 20:39:03 Done.
+
} // namespace ash
« ash/system/tray/hover_highlight_view.h ('K') | « ash/system/tray/hover_highlight_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698