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

Unified Diff: ui/views/widget/tooltip_manager.h

Issue 916423002: Tooltip Cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win build fix Created 5 years, 10 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 | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | ui/views/widget/tooltip_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/tooltip_manager.h
diff --git a/ui/views/widget/tooltip_manager.h b/ui/views/widget/tooltip_manager.h
index 828d4f48dbf0a599d2c06a7795705e69d9d8cc7c..4145db4dc89852201e33ada7d7857fa63c737140 100644
--- a/ui/views/widget/tooltip_manager.h
+++ b/ui/views/widget/tooltip_manager.h
@@ -15,6 +15,7 @@
namespace gfx {
class Display;
class FontList;
+class Point;
} // namespace gfx
namespace views {
@@ -38,17 +39,11 @@ class VIEWS_EXPORT TooltipManager {
TooltipManager() {}
virtual ~TooltipManager() {}
- // Returns the maximum width of the tooltip. |x| and |y| give the location
+ // Returns the maximum width of the tooltip. |point| gives the location
// the tooltip is to be displayed on in screen coordinates. |context| is
// used to determine which gfx::Screen should be used.
- static int GetMaxWidth(int x, int y, gfx::NativeView context);
-
- // Same as GetMaxWidth(), but takes a Display.
- static int GetMaxWidth(const gfx::Display& display);
-
- // If necessary trims the text of a tooltip to ensure we don't try to display
- // a mega-tooltip.
- static void TrimTooltipText(base::string16* text);
+ virtual int GetMaxWidth(const gfx::Point& location,
+ gfx::NativeView context) const = 0;
// Returns the font list used for tooltips.
virtual const gfx::FontList& GetFontList() const = 0;
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | ui/views/widget/tooltip_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698