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

Side by Side Diff: ui/views/corewm/tooltip_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: Write unit test for the case when a tooltip moves from one view to another with the same tooltip bu… 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/corewm/tooltip_aura.h" 5 #include "ui/views/corewm/tooltip_aura.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/aura/window_tree_host.h" 10 #include "ui/aura/window_tree_host.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 bool TooltipAura::IsVisible() { 250 bool TooltipAura::IsVisible() {
251 return widget_ && widget_->IsVisible(); 251 return widget_ && widget_->IsVisible();
252 } 252 }
253 253
254 void TooltipAura::OnWidgetDestroying(views::Widget* widget) { 254 void TooltipAura::OnWidgetDestroying(views::Widget* widget) {
255 DCHECK_EQ(widget_, widget); 255 DCHECK_EQ(widget_, widget);
256 widget_ = NULL; 256 widget_ = NULL;
257 tooltip_window_ = NULL; 257 tooltip_window_ = NULL;
258 } 258 }
259 259
260 gfx::Point TooltipAura::GetTooltipPosition() {
261 if (widget_)
262 return widget_->GetWindowBoundsInScreen().origin();
263 return gfx::Point();
264 }
265
260 } // namespace corewm 266 } // namespace corewm
261 } // namespace views 267 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698