summaryrefslogtreecommitdiffstats
path: root/ui/wm/public/tooltip_client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/wm/public/tooltip_client.cc')
-rw-r--r--ui/wm/public/tooltip_client.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/wm/public/tooltip_client.cc b/ui/wm/public/tooltip_client.cc
index b473238..844cca5 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