Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: ui/wm/public/tooltip_client.h

Issue 916423002: Tooltip Cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win build fix Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/widget/tooltip_manager_aura.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_WM_PUBLIC_TOOLTIP_CLIENT_H_ 5 #ifndef UI_WM_PUBLIC_TOOLTIP_CLIENT_H_
6 #define UI_WM_PUBLIC_TOOLTIP_CLIENT_H_ 6 #define UI_WM_PUBLIC_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 gfx {
12 class Point;
13 }
14
11 namespace aura { 15 namespace aura {
12 class Window; 16 class Window;
13 namespace client { 17 namespace client {
14 18
15 class ScopedTooltipDisabler; 19 class ScopedTooltipDisabler;
16 20
17 class AURA_EXPORT TooltipClient { 21 class AURA_EXPORT TooltipClient {
18 public: 22 public:
23 // Returns the max width of the tooltip when shown at the specified location.
24 virtual int GetMaxWidth(const gfx::Point& point,
25 aura::Window* context) const = 0;
26
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 // Sets the time after which the tooltip is hidden for Window |target|. If 30 // Sets the time after which the tooltip is hidden for Window |target|. If
23 // |timeout_in_ms| is <= 0, the tooltip is shown indefinitely. 31 // |timeout_in_ms| is <= 0, the tooltip is shown indefinitely.
24 virtual void SetTooltipShownTimeout(Window* target, int timeout_in_ms) = 0; 32 virtual void SetTooltipShownTimeout(Window* target, int timeout_in_ms) = 0;
25 33
26 protected: 34 protected:
27 // Enables/Disables tooltips. This is treated as a reference count. Consumers 35 // Enables/Disables tooltips. This is treated as a reference count. Consumers
28 // must use ScopedTooltipDisabler to enable/disabled tooltips. 36 // must use ScopedTooltipDisabler to enable/disabled tooltips.
(...skipping 13 matching lines...) Expand all
42 AURA_EXPORT void SetTooltipText(Window* window, 50 AURA_EXPORT void SetTooltipText(Window* window,
43 base::string16* tooltip_text); 51 base::string16* tooltip_text);
44 AURA_EXPORT void SetTooltipId(Window* window, void* id); 52 AURA_EXPORT void SetTooltipId(Window* window, void* id);
45 AURA_EXPORT const base::string16 GetTooltipText(Window* window); 53 AURA_EXPORT const base::string16 GetTooltipText(Window* window);
46 AURA_EXPORT const void* GetTooltipId(Window* window); 54 AURA_EXPORT const void* GetTooltipId(Window* window);
47 55
48 } // namespace client 56 } // namespace client
49 } // namespace aura 57 } // namespace aura
50 58
51 #endif // UI_WM_PUBLIC_TOOLTIP_CLIENT_H_ 59 #endif // UI_WM_PUBLIC_TOOLTIP_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/views/widget/tooltip_manager_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698