OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WIDGET_TOOLTIP_MANAGER_AURA_H_ | 5 #ifndef UI_VIEWS_WIDGET_TOOLTIP_MANAGER_AURA_H_ |
6 #define UI_VIEWS_WIDGET_TOOLTIP_MANAGER_AURA_H_ | 6 #define UI_VIEWS_WIDGET_TOOLTIP_MANAGER_AURA_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" |
11 #include "ui/gfx/geometry/point.h" | 11 #include "ui/gfx/geometry/point.h" |
12 #include "ui/views/views_export.h" | |
13 #include "ui/views/widget/tooltip_manager.h" | 12 #include "ui/views/widget/tooltip_manager.h" |
14 | 13 |
15 namespace aura { | 14 namespace aura { |
16 class Window; | 15 class Window; |
17 } | 16 } |
18 | 17 |
19 namespace gfx { | 18 namespace gfx { |
20 class FontList; | 19 class FontList; |
21 } | 20 } |
22 | 21 |
23 namespace views { | 22 namespace views { |
24 | 23 |
25 class Widget; | 24 class Widget; |
26 | 25 |
27 // TooltipManager implementation for Aura. | 26 // TooltipManager implementation for Aura. |
28 class VIEWS_EXPORT TooltipManagerAura : public TooltipManager { | 27 class TooltipManagerAura : public TooltipManager { |
29 public: | 28 public: |
30 explicit TooltipManagerAura(Widget* widget); | 29 explicit TooltipManagerAura(Widget* widget); |
31 ~TooltipManagerAura() override; | 30 ~TooltipManagerAura() override; |
32 | 31 |
33 // If |source| has capture this finds the Widget under the mouse and invokes | 32 // If |source| has capture this finds the Widget under the mouse and invokes |
34 // UpdateTooltip() on it's TooltipManager. This is necessary as when capture | 33 // UpdateTooltip() on it's TooltipManager. This is necessary as when capture |
35 // is held mouse events are only delivered to the Window that has capture even | 34 // is held mouse events are only delivered to the Window that has capture even |
36 // though we may show tooltips for the Window under the mouse. | 35 // though we may show tooltips for the Window under the mouse. |
37 static void UpdateTooltipManagerForCapture(Widget* source); | 36 static void UpdateTooltipManagerForCapture(Widget* source); |
38 | 37 |
(...skipping 17 matching lines...) Expand all Loading... |
56 | 55 |
57 Widget* widget_; | 56 Widget* widget_; |
58 base::string16 tooltip_text_; | 57 base::string16 tooltip_text_; |
59 | 58 |
60 DISALLOW_COPY_AND_ASSIGN(TooltipManagerAura); | 59 DISALLOW_COPY_AND_ASSIGN(TooltipManagerAura); |
61 }; | 60 }; |
62 | 61 |
63 } // namespace views | 62 } // namespace views |
64 | 63 |
65 #endif // UI_VIEWS_WIDGET_TOOLTIP_MANAGER_AURA_H_ | 64 #endif // UI_VIEWS_WIDGET_TOOLTIP_MANAGER_AURA_H_ |
OLD | NEW |