Chromium Code Reviews| Index: ui/aura/client/tooltip_client.h |
| diff --git a/ui/aura/client/tooltip_client.h b/ui/aura/client/tooltip_client.h |
| index c280b8a8b75dd6ffc3ecbb7b360fc80d9ff5abeb..875e0e2df46221ea3ccd81840b615da4de69bb50 100644 |
| --- a/ui/aura/client/tooltip_client.h |
| +++ b/ui/aura/client/tooltip_client.h |
| @@ -12,6 +12,8 @@ namespace aura { |
| class Window; |
| namespace client { |
| +class ScopedTooltipDisabler; |
| + |
| class AURA_EXPORT TooltipClient { |
| public: |
| // Informs the shell tooltip manager of change in tooltip for window |target|. |
| @@ -21,8 +23,13 @@ class AURA_EXPORT TooltipClient { |
| // |timeout_in_ms| is <= 0, the tooltip is shown indefinitely. |
| virtual void SetTooltipShownTimeout(Window* target, int timeout_in_ms) = 0; |
| - // Enables/Disables tooltips. |
| + protected: |
| + // Enables/Disables tooltips. This is treated as a reference count. Consumers |
|
varunjain
2014/01/07 05:07:06
I am not sure how much the ScopedDisabler buys. I
sky
2014/01/07 16:52:03
RWHVA may move between root windows. You are corre
varunjain
2014/01/08 15:43:09
But in that case, the ScopedDisabler is even more
|
| + // must use ScopedTooltipDisabler to enable/disabled tooltips. |
| virtual void SetTooltipsEnabled(bool enable) = 0; |
| + |
| + private: |
| + friend class ScopedTooltipDisabler; |
| }; |
| AURA_EXPORT void SetTooltipClient(Window* root_window, |