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

Unified Diff: ui/wm/public/tooltip_client.cc

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: Sanity fixups 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 side-by-side diff with in-line comments
Download patch
« ui/wm/public/tooltip_client.h ('K') | « ui/wm/public/tooltip_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/public/tooltip_client.cc
diff --git a/ui/wm/public/tooltip_client.cc b/ui/wm/public/tooltip_client.cc
index b47323880e956ac1fd57e9976e5fa7896ae2592e..bc7c4ce745bf6883e56dcdb402d1b5a104c36b05 100644
--- a/ui/wm/public/tooltip_client.cc
+++ b/ui/wm/public/tooltip_client.cc
@@ -9,6 +9,7 @@
DECLARE_WINDOW_PROPERTY_TYPE(aura::client::TooltipClient*)
DECLARE_WINDOW_PROPERTY_TYPE(base::string16*)
+DECLARE_WINDOW_PROPERTY_TYPE(void*)
namespace aura {
namespace client {
@@ -16,6 +17,7 @@ namespace client {
DEFINE_LOCAL_WINDOW_PROPERTY_KEY(
TooltipClient*, kRootWindowTooltipClientKey, NULL);
DEFINE_LOCAL_WINDOW_PROPERTY_KEY(base::string16*, kTooltipTextKey, NULL);
+DEFINE_LOCAL_WINDOW_PROPERTY_KEY(void**, kTooltipUniqueKey, NULL);
void SetTooltipClient(Window* root_window, TooltipClient* client) {
DCHECK_EQ(root_window->GetRootWindow(), root_window);
@@ -29,8 +31,11 @@ TooltipClient* GetTooltipClient(Window* root_window) {
root_window->GetProperty(kRootWindowTooltipClientKey) : NULL;
}
-void SetTooltipText(Window* window, base::string16* tooltip_text) {
+void SetTooltipText(Window* window,
+ base::string16* tooltip_text,
+ void** unique) {
window->SetProperty(kTooltipTextKey, tooltip_text);
+ window->SetProperty(kTooltipUniqueKey, unique);
}
const base::string16 GetTooltipText(Window* window) {
@@ -38,5 +43,10 @@ const base::string16 GetTooltipText(Window* window) {
return string_ptr ? *string_ptr : base::string16();
}
+const void* GetTooltipUnique(Window* window) {
+ void** ptr = window->GetProperty(kTooltipUniqueKey);
sky 2014/04/23 20:08:46 Seems like this implementation should be: return w
Mikus 2014/04/24 08:39:56 Not really. It doesn't work in that case since we
+ return ptr ? *ptr : NULL;
+}
+
} // namespace client
} // namespace aura
« ui/wm/public/tooltip_client.h ('K') | « ui/wm/public/tooltip_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698