Make castv2 performance test work.
[chromium-blink-merge.git] / ui / views / corewm / tooltip.h
blobb8e6803a17234806284ce1265ee9b3616443ba96
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_COREWM_TOOLTIP_H_
6 #define UI_VIEWS_COREWM_TOOLTIP_H_
8 #include "base/strings/string16.h"
9 #include "ui/views/views_export.h"
11 namespace aura {
12 class Window;
15 namespace gfx {
16 class Point;
19 namespace views {
20 namespace corewm {
22 // Tooltip is responsible for showing the tooltip in an appropriate manner.
23 // Tooltip is used by TooltipController.
24 class VIEWS_EXPORT Tooltip {
25 public:
26 virtual ~Tooltip() {}
28 // Returns the max width of the tooltip when shown at the specified location.
29 virtual int GetMaxWidth(const gfx::Point& location,
30 aura::Window* context) const = 0;
32 // Updates the text on the tooltip and resizes to fit.
33 virtual void SetText(aura::Window* window,
34 const base::string16& tooltip_text,
35 const gfx::Point& location) = 0;
37 // Shows the tooltip at the specified location (in screen coordinates).
38 virtual void Show() = 0;
40 // Hides the tooltip.
41 virtual void Hide() = 0;
43 // Is the tooltip visibile?
44 virtual bool IsVisible() = 0;
47 } // namespace corewm
48 } // namespace views
50 #endif // UI_VIEWS_COREWM_TOOLTIP_H_