| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AURA_CLIENT_TOOLTIP_CLIENT_H_ | 5 #ifndef UI_AURA_CLIENT_TOOLTIP_CLIENT_H_ |
| 6 #define UI_AURA_CLIENT_TOOLTIP_CLIENT_H_ | 6 #define UI_AURA_CLIENT_TOOLTIP_CLIENT_H_ |
| 7 | 7 |
| 8 #include "ui/aura/aura_export.h" | 8 #include "ui/aura/aura_export.h" |
| 9 #include "ui/gfx/font.h" | 9 #include "ui/gfx/font.h" |
| 10 | 10 |
| 11 namespace aura { | 11 namespace aura { |
| 12 class RootWindow; | 12 class RootWindow; |
| 13 class Window; | 13 class Window; |
| 14 |
| 14 namespace client { | 15 namespace client { |
| 15 | 16 |
| 16 class AURA_EXPORT TooltipClient { | 17 class AURA_EXPORT TooltipClient { |
| 17 public: | 18 public: |
| 18 // Informs the shell tooltip manager of change in tooltip for window |target|. | 19 // Informs the shell tooltip manager of change in tooltip for window |target|. |
| 19 virtual void UpdateTooltip(Window* target) = 0; | 20 virtual void UpdateTooltip(Window* target) = 0; |
| 20 | 21 |
| 21 // Sets the time after which the tooltip is hidden for Window |target|. If | 22 // Sets the time after which the tooltip is hidden for Window |target|. If |
| 22 // |timeout_in_ms| is <= 0, the tooltip is shown indefinitely. | 23 // |timeout_in_ms| is <= 0, the tooltip is shown indefinitely. |
| 23 virtual void SetTooltipShownTimeout(Window* target, int timeout_in_ms) = 0; | 24 virtual void SetTooltipShownTimeout(Window* target, int timeout_in_ms) = 0; |
| 24 | 25 |
| 25 // Enables/Disables tooltips. | 26 // Enables/Disables tooltips. |
| 26 virtual void SetTooltipsEnabled(bool enable) = 0; | 27 virtual void SetTooltipsEnabled(bool enable) = 0; |
| 27 }; | 28 }; |
| 28 | 29 |
| 29 AURA_EXPORT void SetTooltipClient(RootWindow* root_window, | 30 AURA_EXPORT void SetTooltipClient(RootWindow* root_window, |
| 30 TooltipClient* client); | 31 TooltipClient* client); |
| 31 AURA_EXPORT TooltipClient* GetTooltipClient(RootWindow* root_window); | 32 AURA_EXPORT TooltipClient* GetTooltipClient(RootWindow* root_window); |
| 32 AURA_EXPORT void SetTooltipText(Window* window, string16* tooltip_text); | 33 |
| 33 AURA_EXPORT const string16 GetTooltipText(Window* window); | 34 AURA_EXPORT void SetTooltipText(Window* window, base::string16* tooltip_text); |
| 35 AURA_EXPORT const base::string16 GetTooltipText(Window* window); |
| 34 | 36 |
| 35 } // namespace client | 37 } // namespace client |
| 36 } // namespace aura | 38 } // namespace aura |
| 37 | 39 |
| 38 #endif // UI_AURA_CLIENT_TOOLTIP_CLIENT_H_ | 40 #endif // UI_AURA_CLIENT_TOOLTIP_CLIENT_H_ |
| OLD | NEW |