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

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: Fix Linux test TooltipControllerTest3 Created 6 years, 6 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
« no previous file with comments | « 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..844cca51d1b4afb9594499893469e4628180a61a 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*, kTooltipIdKey, NULL);
void SetTooltipClient(Window* root_window, TooltipClient* client) {
DCHECK_EQ(root_window->GetRootWindow(), root_window);
@@ -33,10 +35,18 @@ void SetTooltipText(Window* window, base::string16* tooltip_text) {
window->SetProperty(kTooltipTextKey, tooltip_text);
}
+void SetTooltipId(Window* window, void* id) {
+ window->SetProperty(kTooltipIdKey, id);
+}
+
const base::string16 GetTooltipText(Window* window) {
base::string16* string_ptr = window->GetProperty(kTooltipTextKey);
return string_ptr ? *string_ptr : base::string16();
}
+const void* GetTooltipId(Window* window) {
+ return window->GetProperty(kTooltipIdKey);
+}
+
} // namespace client
} // namespace aura
« no previous file with comments | « ui/wm/public/tooltip_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698