OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_VIEWS_COREWM_TOOLTIP_H_ | 5 #ifndef UI_VIEWS_COREWM_TOOLTIP_H_ |
6 #define UI_VIEWS_COREWM_TOOLTIP_H_ | 6 #define UI_VIEWS_COREWM_TOOLTIP_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "ui/views/views_export.h" | 9 #include "ui/views/views_export.h" |
10 | 10 |
11 namespace aura { | 11 namespace aura { |
12 class Window; | 12 class Window; |
13 } | 13 } |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 class Point; | 16 class Point; |
17 } | 17 } |
18 | 18 |
19 namespace views { | 19 namespace views { |
20 namespace corewm { | 20 namespace corewm { |
21 | 21 |
22 // Tooltip is responsible for showing the tooltip in an appropriate manner. | 22 // Tooltip is responsible for showing the tooltip in an appropriate manner. |
23 // Tooltip is used by TooltipController. | 23 // Tooltip is used by TooltipController. |
24 class VIEWS_EXPORT Tooltip { | 24 class VIEWS_EXPORT Tooltip { |
25 public: | 25 public: |
26 virtual ~Tooltip() {} | 26 virtual ~Tooltip() {} |
27 | 27 |
28 // Updates the text on the tooltip and resizes to fit. | 28 // Updates the text on the tooltip and resizes to fit. |
29 virtual void SetText(aura::Window* window, | 29 virtual void SetText(aura::Window* window, |
30 const string16& tooltip_text, | 30 const base::string16& tooltip_text, |
31 const gfx::Point& location) = 0; | 31 const gfx::Point& location) = 0; |
32 | 32 |
33 // Shows the tooltip at the specified location (in screen coordinates). | 33 // Shows the tooltip at the specified location (in screen coordinates). |
34 virtual void Show() = 0; | 34 virtual void Show() = 0; |
35 | 35 |
36 // Hides the tooltip. | 36 // Hides the tooltip. |
37 virtual void Hide() = 0; | 37 virtual void Hide() = 0; |
38 | 38 |
39 // Is the tooltip visibile? | 39 // Is the tooltip visibile? |
40 virtual bool IsVisible() = 0; | 40 virtual bool IsVisible() = 0; |
41 }; | 41 }; |
42 | 42 |
43 } // namespace corewm | 43 } // namespace corewm |
44 } // namespace views | 44 } // namespace views |
45 | 45 |
46 #endif // UI_VIEWS_COREWM_TOOLTIP_H_ | 46 #endif // UI_VIEWS_COREWM_TOOLTIP_H_ |
OLD | NEW |