Home | History | Annotate | Download | only in client
      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 
     11 namespace aura {
     12 class Window;
     13 namespace client {
     14 
     15 class AURA_EXPORT TooltipClient {
     16  public:
     17   // Informs the shell tooltip manager of change in tooltip for window |target|.
     18   virtual void UpdateTooltip(Window* target) = 0;
     19 
     20   // Sets the time after which the tooltip is hidden for Window |target|. If
     21   // |timeout_in_ms| is <= 0, the tooltip is shown indefinitely.
     22   virtual void SetTooltipShownTimeout(Window* target, int timeout_in_ms) = 0;
     23 
     24   // Enables/Disables tooltips.
     25   virtual void SetTooltipsEnabled(bool enable) = 0;
     26 };
     27 
     28 AURA_EXPORT void SetTooltipClient(Window* root_window,
     29                                   TooltipClient* client);
     30 AURA_EXPORT TooltipClient* GetTooltipClient(Window* root_window);
     31 
     32 AURA_EXPORT void SetTooltipText(Window* window, base::string16* tooltip_text);
     33 AURA_EXPORT const base::string16 GetTooltipText(Window* window);
     34 
     35 }  // namespace client
     36 }  // namespace aura
     37 
     38 #endif  // UI_AURA_CLIENT_TOOLTIP_CLIENT_H_
     39