From ebbe63774233a330d0ccabb2fd129bdf41b036ac Mon Sep 17 00:00:00 2001 From: oshima Date: Thu, 19 Feb 2015 10:41:32 -0800 Subject: Tooltip Cleanup This is prep for tooltip improvement: https://codereview.chromium.org/924433002/ (WIP) * Consolidated GetMaxWidth * Eliminate screen type argument. This can be obtained from tooltip window. * Move tooltip truncate code from TooltipManager to TooltipController BUG=None TEST=no functional change. all test should pass. Review URL: https://codereview.chromium.org/916423002 Cr-Commit-Position: refs/heads/master@{#317081} --- ui/wm/public/tooltip_client.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ui/wm/public') diff --git a/ui/wm/public/tooltip_client.h b/ui/wm/public/tooltip_client.h index f2b97cd..f58a63e 100644 --- a/ui/wm/public/tooltip_client.h +++ b/ui/wm/public/tooltip_client.h @@ -8,6 +8,10 @@ #include "ui/aura/aura_export.h" #include "ui/gfx/font.h" +namespace gfx { +class Point; +} + namespace aura { class Window; namespace client { @@ -16,6 +20,10 @@ class ScopedTooltipDisabler; class AURA_EXPORT TooltipClient { public: + // Returns the max width of the tooltip when shown at the specified location. + virtual int GetMaxWidth(const gfx::Point& point, + aura::Window* context) const = 0; + // Informs the shell tooltip manager of change in tooltip for window |target|. virtual void UpdateTooltip(Window* target) = 0; -- cgit v1.1