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

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

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
« no previous file with comments | « no previous file | ash/system/tray/hover_highlight_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/hover_highlight_view.h
diff --git a/ash/system/tray/hover_highlight_view.h b/ash/system/tray/hover_highlight_view.h
index 6b9d1a22a42dada37b43bc1e360a19c348de0b48..40819bd26b1d239e08a9e24f5ba925b0be7b9ed5 100644
--- a/ash/system/tray/hover_highlight_view.h
+++ b/ash/system/tray/hover_highlight_view.h
@@ -26,6 +26,10 @@ class HoverHighlightView : public ActionableView {
explicit HoverHighlightView(ViewClickListener* listener);
~HoverHighlightView() override;
+ // views::View
+ bool GetTooltipText(const gfx::Point& p,
+ base::string16* tooltip) const override;
+
// Convenience function for adding an icon and a label. This also sets the
// accessible name.
void AddIconAndLabel(const gfx::ImageSkia& image,
@@ -66,6 +70,8 @@ class HoverHighlightView : public ActionableView {
bool hover() const { return hover_; }
+ void set_tooltip(const base::string16& tooltip) { tooltip_ = tooltip; }
+
protected:
// Overridden from views::View.
void GetAccessibleState(ui::AXViewState* state) override;
@@ -103,6 +109,7 @@ class HoverHighlightView : public ActionableView {
bool expandable_;
bool checkable_;
bool checked_;
+ base::string16 tooltip_;
DISALLOW_COPY_AND_ASSIGN(HoverHighlightView);
};
« no previous file with comments | « no previous file | ash/system/tray/hover_highlight_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698