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

Side by Side Diff: ui/views/corewm/tooltip_aura.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_AURA_H_ 5 #ifndef UI_VIEWS_COREWM_TOOLTIP_AURA_H_
6 #define UI_VIEWS_COREWM_TOOLTIP_AURA_H_ 6 #define UI_VIEWS_COREWM_TOOLTIP_AURA_H_
7 7
8 #include "ui/gfx/screen_type_delegate.h" 8 #include "ui/gfx/screen_type_delegate.h"
9 #include "ui/views/controls/label.h" 9 #include "ui/views/controls/label.h"
10 #include "ui/views/corewm/tooltip.h" 10 #include "ui/views/corewm/tooltip.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Destroys |widget_|. 55 // Destroys |widget_|.
56 void DestroyWidget(); 56 void DestroyWidget();
57 57
58 // Tooltip: 58 // Tooltip:
59 virtual void SetText(aura::Window* window, 59 virtual void SetText(aura::Window* window,
60 const base::string16& tooltip_text, 60 const base::string16& tooltip_text,
61 const gfx::Point& location) OVERRIDE; 61 const gfx::Point& location) OVERRIDE;
62 virtual void Show() OVERRIDE; 62 virtual void Show() OVERRIDE;
63 virtual void Hide() OVERRIDE; 63 virtual void Hide() OVERRIDE;
64 virtual bool IsVisible() OVERRIDE; 64 virtual bool IsVisible() OVERRIDE;
65 virtual gfx::Point GetTooltipPosition() OVERRIDE;
65 66
66 // WidgetObserver: 67 // WidgetObserver:
67 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE; 68 virtual void OnWidgetDestroying(Widget* widget) OVERRIDE;
68 69
69 const gfx::ScreenType screen_type_; 70 const gfx::ScreenType screen_type_;
70 71
71 // The label showing the tooltip. 72 // The label showing the tooltip.
72 Label label_; 73 Label label_;
73 74
74 // The widget containing the tooltip. May be NULL. 75 // The widget containing the tooltip. May be NULL.
75 Widget* widget_; 76 Widget* widget_;
76 77
77 // The window we're showing the tooltip for. Never NULL and valid while 78 // The window we're showing the tooltip for. Never NULL and valid while
78 // showing. 79 // showing.
79 aura::Window* tooltip_window_; 80 aura::Window* tooltip_window_;
80 81
81 DISALLOW_COPY_AND_ASSIGN(TooltipAura); 82 DISALLOW_COPY_AND_ASSIGN(TooltipAura);
82 }; 83 };
83 84
84 } // namespace corewm 85 } // namespace corewm
85 } // namespace views 86 } // namespace views
86 87
87 #endif // UI_VIEWS_COREWM_TOOLTIP_AURA_H_ 88 #endif // UI_VIEWS_COREWM_TOOLTIP_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698