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

Side by Side Diff: ui/views/widget/tooltip_manager_aura.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 unified diff | Download patch
« no previous file with comments | « ui/views/corewm/tooltip_controller_unittest.cc ('k') | ui/wm/public/tooltip_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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.
OLDNEW
« no previous file with comments | « ui/views/corewm/tooltip_controller_unittest.cc ('k') | ui/wm/public/tooltip_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698