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