| 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_AURA_H_ | 5 #ifndef UI_VIEWS_COREWM_TOOLTIP_AURA_H_ |
| 6 #define UI_VIEWS_COREWM_TOOLTIP_AURA_H_ | 6 #define UI_VIEWS_COREWM_TOOLTIP_AURA_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/screen_type_delegate.h" | 8 #include "ui/gfx/screen_type_delegate.h" |
| 9 #include "ui/views/controls/label.h" | 9 #include "ui/views/controls/label.h" |
| 10 #include "ui/views/corewm/tooltip.h" | 10 #include "ui/views/corewm/tooltip.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // and applies the adjusted bounds to the label_. | 44 // and applies the adjusted bounds to the label_. |
| 45 void SetTooltipBounds(const gfx::Point& mouse_pos, | 45 void SetTooltipBounds(const gfx::Point& mouse_pos, |
| 46 const gfx::Size& tooltip_size); | 46 const gfx::Size& tooltip_size); |
| 47 | 47 |
| 48 // Destroys |widget_|. | 48 // Destroys |widget_|. |
| 49 void DestroyWidget(); | 49 void DestroyWidget(); |
| 50 | 50 |
| 51 // Tooltip: | 51 // Tooltip: |
| 52 virtual void SetText(aura::Window* window, | 52 virtual void SetText(aura::Window* window, |
| 53 const base::string16& tooltip_text, | 53 const base::string16& tooltip_text, |
| 54 const gfx::Point& location) OVERRIDE; | 54 const gfx::Point& location) override; |
| 55 virtual void Show() OVERRIDE; | 55 virtual void Show() override; |
| 56 virtual void Hide() OVERRIDE; | 56 virtual void Hide() override; |
| 57 virtual bool IsVisible() OVERRIDE; | 57 virtual bool IsVisible() override; |
| 58 | 58 |
| 59 // WidgetObserver: | 59 // WidgetObserver: |
| 60 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE; | 60 virtual void OnWidgetDestroying(Widget* widget) override; |
| 61 | 61 |
| 62 const gfx::ScreenType screen_type_; | 62 const gfx::ScreenType screen_type_; |
| 63 | 63 |
| 64 // The label showing the tooltip. | 64 // The label showing the tooltip. |
| 65 Label label_; | 65 Label label_; |
| 66 | 66 |
| 67 // The widget containing the tooltip. May be NULL. | 67 // The widget containing the tooltip. May be NULL. |
| 68 Widget* widget_; | 68 Widget* widget_; |
| 69 | 69 |
| 70 // The window we're showing the tooltip for. Never NULL and valid while | 70 // The window we're showing the tooltip for. Never NULL and valid while |
| 71 // showing. | 71 // showing. |
| 72 aura::Window* tooltip_window_; | 72 aura::Window* tooltip_window_; |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(TooltipAura); | 74 DISALLOW_COPY_AND_ASSIGN(TooltipAura); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace corewm | 77 } // namespace corewm |
| 78 } // namespace views | 78 } // namespace views |
| 79 | 79 |
| 80 #endif // UI_VIEWS_COREWM_TOOLTIP_AURA_H_ | 80 #endif // UI_VIEWS_COREWM_TOOLTIP_AURA_H_ |
| OLD | NEW |