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

Side by Side Diff: ui/views/corewm/tooltip_win.h

Issue 213833018: Aura tooltips do not move on mouse move in case of many neighboring views with the same label (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Write unit test for the case when a tooltip moves from one view to another with the same tooltip bu… Created 6 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_VIEWS_COREWM_TOOLTIP_WIN_H_ 5 #ifndef UI_VIEWS_COREWM_TOOLTIP_WIN_H_
6 #define UI_VIEWS_COREWM_TOOLTIP_WIN_H_ 6 #define UI_VIEWS_COREWM_TOOLTIP_WIN_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 25 matching lines...) Expand all
36 // Sets the position of the tooltip. 36 // Sets the position of the tooltip.
37 void PositionTooltip(); 37 void PositionTooltip();
38 38
39 // Tooltip: 39 // Tooltip:
40 virtual void SetText(aura::Window* window, 40 virtual void SetText(aura::Window* window,
41 const base::string16& tooltip_text, 41 const base::string16& tooltip_text,
42 const gfx::Point& location) OVERRIDE; 42 const gfx::Point& location) OVERRIDE;
43 virtual void Show() OVERRIDE; 43 virtual void Show() OVERRIDE;
44 virtual void Hide() OVERRIDE; 44 virtual void Hide() OVERRIDE;
45 virtual bool IsVisible() OVERRIDE; 45 virtual bool IsVisible() OVERRIDE;
46 virtual gfx::Point GetTooltipPosition() OVERRIDE;
46 47
47 // The window |tooltip_hwnd_| is parented to. 48 // The window |tooltip_hwnd_| is parented to.
48 HWND parent_hwnd_; 49 HWND parent_hwnd_;
49 50
50 // Shows the tooltip. 51 // Shows the tooltip.
51 HWND tooltip_hwnd_; 52 HWND tooltip_hwnd_;
52 53
53 // Used to modify the tooltip. 54 // Used to modify the tooltip.
54 TOOLINFO toolinfo_; 55 TOOLINFO toolinfo_;
55 56
56 // Is the tooltip showing? 57 // Is the tooltip showing?
57 bool showing_; 58 bool showing_;
58 59
59 // Location to show the tooltip at. In order to position the tooltip we need 60 // Location to show the tooltip at. In order to position the tooltip we need
60 // to know the size. The size is only available from TTN_SHOW, so we have to 61 // to know the size. The size is only available from TTN_SHOW, so we have to
61 // cache it. 62 // cache it.
62 gfx::Point location_; 63 gfx::Point location_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(TooltipWin); 65 DISALLOW_COPY_AND_ASSIGN(TooltipWin);
65 }; 66 };
66 67
67 } // namespace corewm 68 } // namespace corewm
68 } // namespace views 69 } // namespace views
69 70
70 #endif // UI_VIEWS_COREWM_TOOLTIP_WIN_H_ 71 #endif // UI_VIEWS_COREWM_TOOLTIP_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698