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

Unified Diff: ash/shelf/shelf_view.cc

Issue 425363002: Moving coordinate conversion methods from ash/wm to ui/wm. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 6 years, 4 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/shelf/shelf_bezel_event_filter.cc ('k') | ash/shelf/shelf_view_unittest.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 cc0e1ae2836b73231bfd9e9bfa8663fd878f1089..5e4f00255c028296401e34233c241e8af1e0803f 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -55,6 +55,7 @@
#include "ui/views/view_model.h"
#include "ui/views/view_model_utils.h"
#include "ui/views/widget/widget.h"
+#include "ui/wm/core/coordinate_conversion.h"
using gfx::Animation;
using views::View;
@@ -617,9 +618,8 @@ bool ShelfView::StartDrag(const std::string& app_id,
gfx::Point pt = drag_and_drop_view->GetBoundsInScreen().CenterPoint();
views::View::ConvertPointFromScreen(drag_and_drop_view, &pt);
gfx::Point point_in_root = location_in_screen_coordinates;
- ash::wm::ConvertPointFromScreen(
- ash::wm::GetRootWindowAt(location_in_screen_coordinates),
- &point_in_root);
+ ::wm::ConvertPointFromScreen(
+ ash::wm::GetRootWindowAt(location_in_screen_coordinates), &point_in_root);
ui::MouseEvent event(ui::ET_MOUSE_PRESSED, pt, point_in_root, 0, 0);
PointerPressedOnButton(drag_and_drop_view,
ShelfButtonHost::DRAG_AND_DROP,
@@ -640,9 +640,8 @@ bool ShelfView::Drag(const gfx::Point& location_in_screen_coordinates) {
model_->ItemIndexByID(drag_and_drop_shelf_id_));
ConvertPointFromScreen(drag_and_drop_view, &pt);
gfx::Point point_in_root = location_in_screen_coordinates;
- ash::wm::ConvertPointFromScreen(
- ash::wm::GetRootWindowAt(location_in_screen_coordinates),
- &point_in_root);
+ ::wm::ConvertPointFromScreen(
+ ash::wm::GetRootWindowAt(location_in_screen_coordinates), &point_in_root);
ui::MouseEvent event(ui::ET_MOUSE_DRAGGED, pt, point_in_root, 0, 0);
PointerDraggedOnButton(drag_and_drop_view,
ShelfButtonHost::DRAG_AND_DROP,
@@ -1010,8 +1009,8 @@ bool ShelfView::HandleRipOffDrag(const ui::LocatedEvent& event) {
delegate_->GetAppIDForShelfID(model_->items()[current_index].id);
gfx::Point screen_location = event.root_location();
- ash::wm::ConvertPointToScreen(GetWidget()->GetNativeWindow()->GetRootWindow(),
- &screen_location);
+ ::wm::ConvertPointToScreen(GetWidget()->GetNativeWindow()->GetRootWindow(),
+ &screen_location);
// To avoid ugly forwards and backwards flipping we use different constants
// for ripping off / re-inserting the items.
« no previous file with comments | « ash/shelf/shelf_bezel_event_filter.cc ('k') | ash/shelf/shelf_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698