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