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_WIN_H_ | 5 #ifndef UI_VIEWS_COREWM_TOOLTIP_WIN_H_ |
6 #define UI_VIEWS_COREWM_TOOLTIP_WIN_H_ | 6 #define UI_VIEWS_COREWM_TOOLTIP_WIN_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 private: | 31 private: |
32 // Ensures |tooltip_hwnd_| is valid. Returns true if valid, false if there | 32 // Ensures |tooltip_hwnd_| is valid. Returns true if valid, false if there |
33 // a problem creating |tooltip_hwnd_|. | 33 // a problem creating |tooltip_hwnd_|. |
34 bool EnsureTooltipWindow(); | 34 bool EnsureTooltipWindow(); |
35 | 35 |
36 // Sets the position of the tooltip. | 36 // Sets the position of the tooltip. |
37 void PositionTooltip(); | 37 void PositionTooltip(); |
38 | 38 |
39 // Tooltip: | 39 // Tooltip: |
40 int GetMaxWidth(const gfx::Point& location, | 40 int GetMaxWidth(const gfx::Point& location) const override; |
41 aura::Window* context) const override; | |
42 void SetText(aura::Window* window, | 41 void SetText(aura::Window* window, |
43 const base::string16& tooltip_text, | 42 const base::string16& tooltip_text, |
44 const gfx::Point& location) override; | 43 const gfx::Point& location) override; |
45 void Show() override; | 44 void Show() override; |
46 void Hide() override; | 45 void Hide() override; |
47 bool IsVisible() override; | 46 bool IsVisible() override; |
48 | 47 |
49 // The window |tooltip_hwnd_| is parented to. | 48 // The window |tooltip_hwnd_| is parented to. |
50 HWND parent_hwnd_; | 49 HWND parent_hwnd_; |
51 | 50 |
(...skipping 11 matching lines...) Expand all Loading... |
63 // cache it. | 62 // cache it. |
64 gfx::Point location_; | 63 gfx::Point location_; |
65 | 64 |
66 DISALLOW_COPY_AND_ASSIGN(TooltipWin); | 65 DISALLOW_COPY_AND_ASSIGN(TooltipWin); |
67 }; | 66 }; |
68 | 67 |
69 } // namespace corewm | 68 } // namespace corewm |
70 } // namespace views | 69 } // namespace views |
71 | 70 |
72 #endif // UI_VIEWS_COREWM_TOOLTIP_WIN_H_ | 71 #endif // UI_VIEWS_COREWM_TOOLTIP_WIN_H_ |
OLD | NEW |