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

Unified Diff: ash/shelf/shelf_view.cc

Issue 2900423002: [mus+ash] Removes WmWindow from ash/wm/root_window_finder.h (Closed)
Patch Set: Remove WmWindow from ash/wm/root_window_finder.h (tab drag test) Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/screen_mus.cc ('k') | ash/shell_port.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view.cc
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index 810d6cee27a290daf20ddfedc6aa1c990dfc69e9..f004c6e3531cb61fab11d96b51152ec75d798ba1 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -562,9 +562,9 @@ bool ShelfView::StartDrag(const std::string& app_id,
// First we have to center the mouse cursor over the item.
gfx::Point pt = drag_and_drop_view->GetBoundsInScreen().CenterPoint();
views::View::ConvertPointFromScreen(drag_and_drop_view, &pt);
- gfx::Point point_in_root =
- wm::GetRootWindowAt(location_in_screen_coordinates)
- ->ConvertPointFromScreen(location_in_screen_coordinates);
+ gfx::Point point_in_root = location_in_screen_coordinates;
+ ::wm::ConvertPointFromScreen(
+ wm::GetRootWindowAt(location_in_screen_coordinates), &point_in_root);
ui::MouseEvent event(ui::ET_MOUSE_PRESSED, pt, point_in_root,
ui::EventTimeForNow(), 0, 0);
PointerPressedOnButton(drag_and_drop_view, DRAG_AND_DROP, event);
@@ -583,9 +583,9 @@ bool ShelfView::Drag(const gfx::Point& location_in_screen_coordinates) {
views::View* drag_and_drop_view =
view_model_->view_at(model_->ItemIndexByID(drag_and_drop_shelf_id_));
ConvertPointFromScreen(drag_and_drop_view, &pt);
- gfx::Point point_in_root =
- wm::GetRootWindowAt(location_in_screen_coordinates)
- ->ConvertPointFromScreen(location_in_screen_coordinates);
+ gfx::Point point_in_root = location_in_screen_coordinates;
+ ::wm::ConvertPointFromScreen(
+ wm::GetRootWindowAt(location_in_screen_coordinates), &point_in_root);
ui::MouseEvent event(ui::ET_MOUSE_DRAGGED, pt, point_in_root,
ui::EventTimeForNow(), 0, 0);
PointerDraggedOnButton(drag_and_drop_view, DRAG_AND_DROP, event);
« no previous file with comments | « ash/mus/screen_mus.cc ('k') | ash/shell_port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698