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

Side by Side Diff: ash/shelf/shelf_tooltip_manager.cc

Issue 139983009: ui::LocatedEvent location() returns gfx::PointF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo accidental change. Created 6 years, 7 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 | Annotate | Revision Log
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 "ash/shelf/shelf_tooltip_manager.h" 5 #include "ash/shelf/shelf_tooltip_manager.h"
6 6
7 #include "ash/shelf/shelf_layout_manager.h" 7 #include "ash/shelf/shelf_layout_manager.h"
8 #include "ash/shelf/shelf_view.h" 8 #include "ash/shelf/shelf_view.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 CloseSoon(); 259 CloseSoon();
260 return; 260 return;
261 } 261 }
262 262
263 aura::Window* target = static_cast<aura::Window*>(event->target()); 263 aura::Window* target = static_cast<aura::Window*>(event->target());
264 if (widget_->GetNativeWindow()->GetRootWindow() != target->GetRootWindow()) { 264 if (widget_->GetNativeWindow()->GetRootWindow() != target->GetRootWindow()) {
265 CloseSoon(); 265 CloseSoon();
266 return; 266 return;
267 } 267 }
268 268
269 gfx::Point location_in_shelf_view = event->location(); 269 gfx::Point location_in_shelf_view = gfx::ToFlooredPoint(event->location());
270 aura::Window::ConvertPointToTarget( 270 aura::Window::ConvertPointToTarget(
271 target, shelf_view_->GetWidget()->GetNativeWindow(), 271 target, shelf_view_->GetWidget()->GetNativeWindow(),
272 &location_in_shelf_view); 272 &location_in_shelf_view);
273 273
274 if (shelf_view_->ShouldHideTooltip(location_in_shelf_view)) { 274 if (shelf_view_->ShouldHideTooltip(location_in_shelf_view)) {
275 // Because this mouse event may arrive to |view_|, here we just schedule 275 // Because this mouse event may arrive to |view_|, here we just schedule
276 // the closing event rather than directly calling Close(). 276 // the closing event rather than directly calling Close().
277 CloseSoon(); 277 CloseSoon();
278 } 278 }
279 } 279 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 base::OneShotTimer<ShelfTooltipManager>* new_timer = 368 base::OneShotTimer<ShelfTooltipManager>* new_timer =
369 new base::OneShotTimer<ShelfTooltipManager>(); 369 new base::OneShotTimer<ShelfTooltipManager>();
370 new_timer->Start(FROM_HERE, 370 new_timer->Start(FROM_HERE,
371 base::TimeDelta::FromMilliseconds(delay_in_ms), 371 base::TimeDelta::FromMilliseconds(delay_in_ms),
372 this, 372 this,
373 &ShelfTooltipManager::ShowInternal); 373 &ShelfTooltipManager::ShowInternal);
374 timer_.reset(new_timer); 374 timer_.reset(new_timer);
375 } 375 }
376 376
377 } // namespace ash 377 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698