| 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_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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/aura/aura_export.h" | 9 #include "ui/aura/aura_export.h" |
| 10 #include "ui/aura/event.h" | 10 #include "ui/aura/event.h" |
| 11 #include "ui/gfx/font.h" | 11 #include "ui/gfx/font.h" |
| 12 | 12 |
| 13 namespace aura { | 13 namespace aura { |
| 14 class Window; | 14 class Window; |
| 15 namespace client { | 15 namespace client { |
| 16 | 16 |
| 17 // A property key to store the tooltip client for the root window. The type of |
| 18 // the value is |aura::client::TooltipClient*|. |
| 19 AURA_EXPORT extern const char kRootWindowTooltipClientKey[]; |
| 20 |
| 21 // A property key to store tooltip text for a window. The type of the value |
| 22 // is |string16*|. |
| 23 AURA_EXPORT extern const char kTooltipTextKey[]; |
| 24 |
| 17 class AURA_EXPORT TooltipClient { | 25 class AURA_EXPORT TooltipClient { |
| 18 public: | 26 public: |
| 19 // Informs the shell tooltip manager of change in tooltip for window |target|. | 27 // Informs the shell tooltip manager of change in tooltip for window |target|. |
| 20 virtual void UpdateTooltip(Window* target) = 0; | 28 virtual void UpdateTooltip(Window* target) = 0; |
| 21 }; | 29 }; |
| 22 | 30 |
| 23 AURA_EXPORT void SetTooltipClient(TooltipClient* client); | 31 AURA_EXPORT void SetTooltipClient(TooltipClient* client); |
| 24 AURA_EXPORT TooltipClient* GetTooltipClient(); | 32 AURA_EXPORT TooltipClient* GetTooltipClient(); |
| 25 AURA_EXPORT void SetTooltipText(Window* window, string16* tooltip_text); | 33 AURA_EXPORT void SetTooltipText(Window* window, string16* tooltip_text); |
| 26 AURA_EXPORT string16* GetTooltipText(Window* window); | 34 AURA_EXPORT string16* GetTooltipText(Window* window); |
| 27 | 35 |
| 28 } // namespace client | 36 } // namespace client |
| 29 } // namespace aura | 37 } // namespace aura |
| 30 | 38 |
| 31 #endif // UI_AURA_CLIENT_TOOLTIP_CLIENT_H_ | 39 #endif // UI_AURA_CLIENT_TOOLTIP_CLIENT_H_ |
| OLD | NEW |