OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ui/views/widget/tooltip_manager_aura.h" | 5 #include "ui/views/widget/tooltip_manager_aura.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/aura/client/screen_position_client.h" | 8 #include "ui/aura/client/screen_position_client.h" |
9 #include "ui/aura/window_event_dispatcher.h" | 9 #include "ui/aura/window_event_dispatcher.h" |
10 #include "ui/aura/window_tree_host.h" | 10 #include "ui/aura/window_tree_host.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 gfx::Point view_point = point; | 126 gfx::Point view_point = point; |
127 View::ConvertPointFromWidget(target, &view_point); | 127 View::ConvertPointFromWidget(target, &view_point); |
128 base::string16 new_tooltip_text; | 128 base::string16 new_tooltip_text; |
129 if (!target->GetTooltipText(view_point, &new_tooltip_text)) | 129 if (!target->GetTooltipText(view_point, &new_tooltip_text)) |
130 tooltip_text_.clear(); | 130 tooltip_text_.clear(); |
131 else | 131 else |
132 tooltip_text_ = new_tooltip_text; | 132 tooltip_text_ = new_tooltip_text; |
133 } else { | 133 } else { |
134 tooltip_text_.clear(); | 134 tooltip_text_.clear(); |
135 } | 135 } |
| 136 |
| 137 aura::client::SetTooltipId(GetWindow(), target); |
| 138 |
136 aura::client::GetTooltipClient(root_window)->UpdateTooltip(GetWindow()); | 139 aura::client::GetTooltipClient(root_window)->UpdateTooltip(GetWindow()); |
137 } | 140 } |
138 | 141 |
139 aura::Window* TooltipManagerAura::GetWindow() { | 142 aura::Window* TooltipManagerAura::GetWindow() { |
140 return widget_->GetNativeView(); | 143 return widget_->GetNativeView(); |
141 } | 144 } |
142 | 145 |
143 } // namespace views. | 146 } // namespace views. |
OLD | NEW |