summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authormfomitchev@chromium.org <mfomitchev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-08 22:42:08 +0000
committermfomitchev@chromium.org <mfomitchev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-08 22:43:50 +0000
commitbebe14163854e8795e040cc0d8614f879fed0eab (patch)
tree74389c72d57d7e60a36a00199d6deb59e1672451 /ash
parent2df1ae8e7b2d831306a819fa9d774dad6fc6819d (diff)
downloadchromium_src-bebe14163854e8795e040cc0d8614f879fed0eab.zip
chromium_src-bebe14163854e8795e040cc0d8614f879fed0eab.tar.gz
chromium_src-bebe14163854e8795e040cc0d8614f879fed0eab.tar.bz2
Moving coordinate conversion methods from ash/wm to ui/wm.
Re-submit of https://codereview.chromium.org/425363002/ TBR=sky, oshima BUG=NONE Review URL: https://codereview.chromium.org/445173002 Cr-Commit-Position: refs/heads/master@{#288449} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288449 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/autoclick/autoclick_controller.cc8
-rw-r--r--ash/display/event_transformation_handler.cc4
-rw-r--r--ash/display/mouse_cursor_event_filter.cc10
-rw-r--r--ash/display/mouse_cursor_event_filter_ozone.cc7
-rw-r--r--ash/drag_drop/drag_drop_controller.cc8
-rw-r--r--ash/drag_drop/drag_drop_tracker.cc8
-rw-r--r--ash/shelf/shelf_bezel_event_filter.cc4
-rw-r--r--ash/shelf/shelf_view.cc15
-rw-r--r--ash/shelf/shelf_view_unittest.cc4
-rw-r--r--ash/test/ash_test_base.cc4
-rw-r--r--ash/wm/coordinate_conversion.cc12
-rw-r--r--ash/wm/coordinate_conversion.h10
-rw-r--r--ash/wm/dock/docked_window_layout_manager_unittest.cc3
-rw-r--r--ash/wm/dock/docked_window_resizer.cc4
-rw-r--r--ash/wm/dock/docked_window_resizer_unittest.cc6
-rw-r--r--ash/wm/drag_window_resizer.cc7
-rw-r--r--ash/wm/gestures/overview_gesture_handler.cc4
-rw-r--r--ash/wm/panels/panel_window_resizer.cc4
-rw-r--r--ash/wm/window_resizer.cc3
-rw-r--r--ash/wm/workspace/multi_window_resize_controller.cc4
-rw-r--r--ash/wm/workspace/workspace_window_resizer.cc8
21 files changed, 59 insertions, 78 deletions
diff --git a/ash/autoclick/autoclick_controller.cc b/ash/autoclick/autoclick_controller.cc
index e356602..95ab012 100644
--- a/ash/autoclick/autoclick_controller.cc
+++ b/ash/autoclick/autoclick_controller.cc
@@ -15,6 +15,7 @@
#include "ui/events/event_processor.h"
#include "ui/gfx/point.h"
#include "ui/gfx/vector2d.h"
+#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
@@ -128,9 +129,8 @@ void AutoclickControllerImpl::OnMouseEvent(ui::MouseEvent* event) {
mouse_event_flags_ = event->flags();
gfx::Point mouse_location = event->root_location();
- ash::wm::ConvertPointToScreen(
- wm::GetRootWindowAt(mouse_location),
- &mouse_location);
+ ::wm::ConvertPointToScreen(wm::GetRootWindowAt(mouse_location),
+ &mouse_location);
// The distance between the mouse location and the anchor location
// must exceed a certain threshold to initiate a new autoclick countdown.
@@ -185,7 +185,7 @@ void AutoclickControllerImpl::DoAutoclick() {
gfx::Point click_location(screen_location);
anchor_location_ = click_location;
- wm::ConvertPointFromScreen(root_window, &click_location);
+ ::wm::ConvertPointFromScreen(root_window, &click_location);
aura::WindowTreeHost* host = root_window->GetHost();
host->ConvertPointToHost(&click_location);
diff --git a/ash/display/event_transformation_handler.cc b/ash/display/event_transformation_handler.cc
index 62a6fa1..e1af21f 100644
--- a/ash/display/event_transformation_handler.cc
+++ b/ash/display/event_transformation_handler.cc
@@ -9,7 +9,6 @@
#include "ash/display/display_info.h"
#include "ash/display/display_manager.h"
#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/window_util.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
@@ -17,6 +16,7 @@
#include "ui/events/event.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
+#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
namespace {
@@ -41,7 +41,7 @@ void EventTransformationHandler::OnScrollEvent(ui::ScrollEvent* event) {
// the event locations etc. are already in DIP.
gfx::Point point_in_screen(event->location());
aura::Window* target = static_cast<aura::Window*>(event->target());
- wm::ConvertPointToScreen(target, &point_in_screen);
+ ::wm::ConvertPointToScreen(target, &point_in_screen);
const gfx::Display& display =
Shell::GetScreen()->GetDisplayNearestPoint(point_in_screen);
diff --git a/ash/display/mouse_cursor_event_filter.cc b/ash/display/mouse_cursor_event_filter.cc
index 8da1918..14a6913 100644
--- a/ash/display/mouse_cursor_event_filter.cc
+++ b/ash/display/mouse_cursor_event_filter.cc
@@ -14,7 +14,6 @@
#include "ash/root_window_controller.h"
#include "ash/screen_util.h"
#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/window_util.h"
#include "ui/aura/env.h"
#include "ui/aura/window.h"
@@ -25,6 +24,7 @@
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/gfx/screen.h"
+#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
namespace {
@@ -42,7 +42,7 @@ const int kIndicatorThickness = 1;
void ConvertPointFromScreenToNative(const aura::Window* root_window,
gfx::Point* point) {
- wm::ConvertPointFromScreen(root_window, point);
+ ::wm::ConvertPointFromScreen(root_window, point);
root_window->GetHost()->ConvertPointToNativeScreen(point);
}
@@ -204,7 +204,7 @@ void MouseCursorEventFilter::OnMouseEvent(ui::MouseEvent* event) {
void MouseCursorEventFilter::MoveCursorTo(aura::Window* root,
const gfx::Point& point_in_screen) {
gfx::Point point_in_native = point_in_screen;
- wm::ConvertPointFromScreen(root, &point_in_native);
+ ::wm::ConvertPointFromScreen(root, &point_in_native);
root->GetHost()->ConvertPointToNativeScreen(&point_in_native);
// now fit the point inside the native bounds.
@@ -234,7 +234,7 @@ bool MouseCursorEventFilter::WarpMouseCursorIfNecessary(ui::MouseEvent* event) {
gfx::Point point_in_screen = event->location();
aura::Window* target = static_cast<aura::Window*>(event->target());
- wm::ConvertPointToScreen(target, &point_in_screen);
+ ::wm::ConvertPointToScreen(target, &point_in_screen);
return WarpMouseCursorInNativeCoords(point_in_native, point_in_screen);
}
@@ -379,7 +379,7 @@ bool MouseCursorEventFilter::WarpMouseCursorIfNecessaryForTest(
aura::Window* target_root,
const gfx::Point& point_in_screen) {
gfx::Point native = point_in_screen;
- wm::ConvertPointFromScreen(target_root, &native);
+ ::wm::ConvertPointFromScreen(target_root, &native);
target_root->GetHost()->ConvertPointToNativeScreen(&native);
return WarpMouseCursorInNativeCoords(native, point_in_screen);
}
diff --git a/ash/display/mouse_cursor_event_filter_ozone.cc b/ash/display/mouse_cursor_event_filter_ozone.cc
index c342dba..8c04871 100644
--- a/ash/display/mouse_cursor_event_filter_ozone.cc
+++ b/ash/display/mouse_cursor_event_filter_ozone.cc
@@ -7,6 +7,7 @@
#include "ash/shell.h"
#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/window_util.h"
+#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
@@ -21,7 +22,7 @@ bool MouseCursorEventFilter::WarpMouseCursorIfNecessary(ui::MouseEvent* event) {
gfx::Point point_in_screen(event->location());
aura::Window* target = static_cast<aura::Window*>(event->target());
- wm::ConvertPointToScreen(target, &point_in_screen);
+ ::wm::ConvertPointToScreen(target, &point_in_screen);
return WarpMouseCursorInScreenCoords(target->GetRootWindow(),
point_in_screen);
}
@@ -45,7 +46,7 @@ bool MouseCursorEventFilter::WarpMouseCursorInScreenCoords(
aura::Window* root_at_point = wm::GetRootWindowAt(point_in_screen);
gfx::Point point_in_root = point_in_screen;
- wm::ConvertPointFromScreen(root_at_point, &point_in_root);
+ ::wm::ConvertPointFromScreen(root_at_point, &point_in_root);
gfx::Rect root_bounds = root_at_point->bounds();
int offset_x = 0;
int offset_y = 0;
@@ -86,7 +87,7 @@ bool MouseCursorEventFilter::WarpMouseCursorInScreenCoords(
return false;
}
- wm::ConvertPointFromScreen(dst_root, &point_in_dst_screen);
+ ::wm::ConvertPointFromScreen(dst_root, &point_in_dst_screen);
if (dst_root->bounds().Contains(point_in_dst_screen)) {
DCHECK_NE(dst_root, root_at_point);
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc
index 2ff526f..004298c 100644
--- a/ash/drag_drop/drag_drop_controller.cc
+++ b/ash/drag_drop/drag_drop_controller.cc
@@ -7,7 +7,6 @@
#include "ash/drag_drop/drag_drop_tracker.h"
#include "ash/drag_drop/drag_image_view.h"
#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
@@ -28,6 +27,7 @@
#include "ui/gfx/rect_conversions.h"
#include "ui/views/views_delegate.h"
#include "ui/views/widget/native_widget_aura.h"
+#include "ui/wm/core/coordinate_conversion.h"
#include "ui/wm/public/drag_drop_delegate.h"
namespace ash {
@@ -198,7 +198,7 @@ int DragDropController::StartDragAndDrop(
drag_image_vertical_offset = kTouchDragImageVerticalOffset;
}
gfx::Point start_location = root_location;
- ash::wm::ConvertPointToScreen(root_window, &start_location);
+ ::wm::ConvertPointToScreen(root_window, &start_location);
drag_image_final_bounds_for_cancel_animation_ = gfx::Rect(
start_location - provider->GetDragImageOffset(),
provider->GetDragImage().size());
@@ -292,8 +292,8 @@ void DragDropController::DragUpdate(aura::Window* target,
DCHECK(drag_image_.get());
if (drag_image_->visible()) {
gfx::Point root_location_in_screen = event.root_location();
- ash::wm::ConvertPointToScreen(target->GetRootWindow(),
- &root_location_in_screen);
+ ::wm::ConvertPointToScreen(target->GetRootWindow(),
+ &root_location_in_screen);
drag_image_->SetScreenPosition(
root_location_in_screen - drag_image_offset_);
drag_image_->SetTouchDragOperation(op);
diff --git a/ash/drag_drop/drag_drop_tracker.cc b/ash/drag_drop/drag_drop_tracker.cc
index 193dc62..c1ec244 100644
--- a/ash/drag_drop/drag_drop_tracker.cc
+++ b/ash/drag_drop/drag_drop_tracker.cc
@@ -12,6 +12,7 @@
#include "ui/aura/window_event_dispatcher.h"
#include "ui/events/event.h"
#include "ui/gfx/screen.h"
+#include "ui/wm/core/coordinate_conversion.h"
#include "ui/wm/public/activation_delegate.h"
namespace ash {
@@ -68,12 +69,11 @@ void DragDropTracker::TakeCapture() {
aura::Window* DragDropTracker::GetTarget(const ui::LocatedEvent& event) {
DCHECK(capture_window_.get());
gfx::Point location_in_screen = event.location();
- wm::ConvertPointToScreen(capture_window_.get(),
- &location_in_screen);
+ ::wm::ConvertPointToScreen(capture_window_.get(), &location_in_screen);
aura::Window* root_window_at_point =
wm::GetRootWindowAt(location_in_screen);
gfx::Point location_in_root = location_in_screen;
- wm::ConvertPointFromScreen(root_window_at_point, &location_in_root);
+ ::wm::ConvertPointFromScreen(root_window_at_point, &location_in_root);
return root_window_at_point->GetEventHandlerForPoint(location_in_root);
}
@@ -85,7 +85,7 @@ ui::LocatedEvent* DragDropTracker::ConvertEvent(
aura::Window::ConvertPointToTarget(capture_window_.get(), target,
&target_location);
gfx::Point location_in_screen = event.location();
- ash::wm::ConvertPointToScreen(capture_window_.get(), &location_in_screen);
+ ::wm::ConvertPointToScreen(capture_window_.get(), &location_in_screen);
gfx::Point target_root_location = event.root_location();
aura::Window::ConvertPointToTarget(
capture_window_->GetRootWindow(),
diff --git a/ash/shelf/shelf_bezel_event_filter.cc b/ash/shelf/shelf_bezel_event_filter.cc
index 513a949..9906602 100644
--- a/ash/shelf/shelf_bezel_event_filter.cc
+++ b/ash/shelf/shelf_bezel_event_filter.cc
@@ -6,8 +6,8 @@
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
#include "ui/aura/window.h"
+#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
@@ -26,7 +26,7 @@ void ShelfBezelEventFilter::OnGestureEvent(
ui::GestureEvent* event) {
gfx::Point point_in_screen(event->location());
aura::Window* target = static_cast<aura::Window*>(event->target());
- wm::ConvertPointToScreen(target, &point_in_screen);
+ ::wm::ConvertPointToScreen(target, &point_in_screen);
gfx::Rect screen =
Shell::GetScreen()->GetDisplayNearestPoint(point_in_screen).bounds();
if ((!screen.Contains(point_in_screen) &&
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index cc0e1ae..5e4f002 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.
diff --git a/ash/shelf/shelf_view_unittest.cc b/ash/shelf/shelf_view_unittest.cc
index 1d7a8d0..fc9b076 100644
--- a/ash/shelf/shelf_view_unittest.cc
+++ b/ash/shelf/shelf_view_unittest.cc
@@ -29,7 +29,6 @@
#include "ash/test/shell_test_api.h"
#include "ash/test/test_shelf_delegate.h"
#include "ash/test/test_shelf_item_delegate.h"
-#include "ash/wm/coordinate_conversion.h"
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
@@ -47,6 +46,7 @@
#include "ui/views/view_model.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
+#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
namespace test {
@@ -1604,7 +1604,7 @@ TEST_F(ShelfViewTest, CheckRipOffFromLeftShelfAlignmentWithMultiMonitor) {
// Fetch the start point of dragging.
gfx::Point start_point = button->GetBoundsInScreen().CenterPoint();
- wm::ConvertPointFromScreen(second_root, &start_point);
+ ::wm::ConvertPointFromScreen(second_root, &start_point);
ui::test::EventGenerator generator(second_root, start_point);
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index 70db370c..166e2b7 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -16,7 +16,6 @@
#include "ash/test/test_session_state_delegate.h"
#include "ash/test/test_shell_delegate.h"
#include "ash/test/test_system_tray_delegate.h"
-#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/window_positioner.h"
#include "base/command_line.h"
#include "ui/aura/client/aura_constants.h"
@@ -32,6 +31,7 @@
#include "ui/gfx/display.h"
#include "ui/gfx/point.h"
#include "ui/gfx/screen.h"
+#include "ui/wm/core/coordinate_conversion.h"
#if defined(OS_CHROMEOS)
#include "ash/system/chromeos/tray_display.h"
@@ -262,7 +262,7 @@ aura::Window* AshTestBase::CreateTestWindowInShellWithDelegateAndType(
aura::Window* root = ash::Shell::GetInstance()->display_controller()->
GetRootWindowForDisplayId(display.id());
gfx::Point origin = bounds.origin();
- wm::ConvertPointFromScreen(root, &origin);
+ ::wm::ConvertPointFromScreen(root, &origin);
window->SetBounds(gfx::Rect(origin, bounds.size()));
aura::client::ParentWindowWithContext(window, root, bounds);
}
diff --git a/ash/wm/coordinate_conversion.cc b/ash/wm/coordinate_conversion.cc
index 991e7d4..258f976 100644
--- a/ash/wm/coordinate_conversion.cc
+++ b/ash/wm/coordinate_conversion.cc
@@ -31,17 +31,5 @@ aura::Window* GetRootWindowMatching(const gfx::Rect& rect) {
GetRootWindowForDisplayId(display.id());
}
-void ConvertPointToScreen(const aura::Window* window, gfx::Point* point) {
- CHECK(aura::client::GetScreenPositionClient(window->GetRootWindow()));
- aura::client::GetScreenPositionClient(window->GetRootWindow())->
- ConvertPointToScreen(window, point);
-}
-
-void ConvertPointFromScreen(const aura::Window* window,
- gfx::Point* point_in_screen) {
- aura::client::GetScreenPositionClient(window->GetRootWindow())->
- ConvertPointFromScreen(window, point_in_screen);
-}
-
} // namespace wm
} // namespace ash
diff --git a/ash/wm/coordinate_conversion.h b/ash/wm/coordinate_conversion.h
index 539e7c0..aa4a848 100644
--- a/ash/wm/coordinate_conversion.h
+++ b/ash/wm/coordinate_conversion.h
@@ -28,16 +28,6 @@ ASH_EXPORT aura::Window* GetRootWindowAt(const gfx::Point& point);
// the virtual scren coordinates.
ASH_EXPORT aura::Window* GetRootWindowMatching(const gfx::Rect& rect);
-// Converts the |point| from a given |window|'s coordinates into the screen
-// coordinates.
-ASH_EXPORT void ConvertPointToScreen(const aura::Window* window,
- gfx::Point* point);
-
-// Converts the |point| from the screen coordinates to a given |window|'s
-// coordinates.
-ASH_EXPORT void ConvertPointFromScreen(const aura::Window* window,
- gfx::Point* point_in_screen);
-
} // namespace wm
} // namespace ash
diff --git a/ash/wm/dock/docked_window_layout_manager_unittest.cc b/ash/wm/dock/docked_window_layout_manager_unittest.cc
index 48db154..a8054a3 100644
--- a/ash/wm/dock/docked_window_layout_manager_unittest.cc
+++ b/ash/wm/dock/docked_window_layout_manager_unittest.cc
@@ -33,6 +33,7 @@
#include "ui/base/hit_test.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
+#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
@@ -188,7 +189,7 @@ class DockedWindowLayoutManagerTest
gfx::Rect work_area =
Shell::GetScreen()->GetDisplayNearestWindow(window).work_area();
gfx::Point initial_location_in_screen = initial_location_in_parent_;
- wm::ConvertPointToScreen(window->parent(), &initial_location_in_screen);
+ ::wm::ConvertPointToScreen(window->parent(), &initial_location_in_screen);
// Drag the window left or right to the edge (or almost to it).
if (edge == DOCKED_EDGE_LEFT)
dx += work_area.x() - initial_location_in_screen.x();
diff --git a/ash/wm/dock/docked_window_resizer.cc b/ash/wm/dock/docked_window_resizer.cc
index d6f04d0..14b58d4 100644
--- a/ash/wm/dock/docked_window_resizer.cc
+++ b/ash/wm/dock/docked_window_resizer.cc
@@ -12,7 +12,6 @@
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/dock/docked_window_layout_manager.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
@@ -30,6 +29,7 @@
#include "ui/base/ui_base_types.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
+#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
namespace {
@@ -61,7 +61,7 @@ DockedWindowResizer::Create(WindowResizer* next_window_resizer,
void DockedWindowResizer::Drag(const gfx::Point& location, int event_flags) {
last_location_ = location;
- wm::ConvertPointToScreen(GetTarget()->parent(), &last_location_);
+ ::wm::ConvertPointToScreen(GetTarget()->parent(), &last_location_);
if (!did_move_or_resize_) {
did_move_or_resize_ = true;
StartedDragging();
diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc
index 98c70b0..acb54ff 100644
--- a/ash/wm/dock/docked_window_resizer_unittest.cc
+++ b/ash/wm/dock/docked_window_resizer_unittest.cc
@@ -18,7 +18,6 @@
#include "ash/test/cursor_manager_test_api.h"
#include "ash/test/shell_test_api.h"
#include "ash/test/test_shelf_delegate.h"
-#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/dock/docked_window_layout_manager.h"
#include "ash/wm/drag_window_resizer.h"
#include "ash/wm/panels/panel_layout_manager.h"
@@ -34,6 +33,7 @@
#include "ui/base/ui_base_types.h"
#include "ui/events/test/event_generator.h"
#include "ui/views/widget/widget.h"
+#include "ui/wm/core/coordinate_conversion.h"
#include "ui/wm/core/window_util.h"
namespace ash {
@@ -105,7 +105,7 @@ class DockedWindowResizerTest
aura::Window* root = ash::Shell::GetInstance()->display_controller()->
GetRootWindowForDisplayId(display.id());
gfx::Point origin = bounds.origin();
- wm::ConvertPointFromScreen(root, &origin);
+ ::wm::ConvertPointFromScreen(root, &origin);
window->SetBounds(gfx::Rect(origin, bounds.size()));
aura::client::ParentWindowWithContext(window, root, bounds);
}
@@ -216,7 +216,7 @@ class DockedWindowResizerTest
gfx::Rect work_area =
Shell::GetScreen()->GetDisplayNearestWindow(window).work_area();
gfx::Point initial_location_in_screen = initial_location_in_parent_;
- wm::ConvertPointToScreen(window->parent(), &initial_location_in_screen);
+ ::wm::ConvertPointToScreen(window->parent(), &initial_location_in_screen);
// Drag the window left or right to the edge (or almost to it).
if (edge == DOCKED_EDGE_LEFT)
dx += work_area.x() - initial_location_in_screen.x();
diff --git a/ash/wm/drag_window_resizer.cc b/ash/wm/drag_window_resizer.cc
index 15b0584..214dbc5 100644
--- a/ash/wm/drag_window_resizer.cc
+++ b/ash/wm/drag_window_resizer.cc
@@ -20,6 +20,7 @@
#include "ui/base/hit_test.h"
#include "ui/base/ui_base_types.h"
#include "ui/gfx/screen.h"
+#include "ui/wm/core/coordinate_conversion.h"
#include "ui/wm/core/window_util.h"
namespace ash {
@@ -79,7 +80,7 @@ void DragWindowResizer::Drag(const gfx::Point& location, int event_flags) {
// Show a phantom window for dragging in another root window.
if (HasSecondaryRootWindow()) {
gfx::Point location_in_screen = location;
- wm::ConvertPointToScreen(GetTarget()->parent(), &location_in_screen);
+ ::wm::ConvertPointToScreen(GetTarget()->parent(), &location_in_screen);
const bool in_original_root =
wm::GetRootWindowAt(location_in_screen) == GetTarget()->GetRootWindow();
UpdateDragWindow(GetTarget()->bounds(), in_original_root);
@@ -96,8 +97,8 @@ void DragWindowResizer::CompleteDrag() {
// Check if the destination is another display.
gfx::Point last_mouse_location_in_screen = last_mouse_location_;
- wm::ConvertPointToScreen(GetTarget()->parent(),
- &last_mouse_location_in_screen);
+ ::wm::ConvertPointToScreen(GetTarget()->parent(),
+ &last_mouse_location_in_screen);
gfx::Screen* screen = Shell::GetScreen();
const gfx::Display dst_display =
screen->GetDisplayNearestPoint(last_mouse_location_in_screen);
diff --git a/ash/wm/gestures/overview_gesture_handler.cc b/ash/wm/gestures/overview_gesture_handler.cc
index 642f122..87c867b 100644
--- a/ash/wm/gestures/overview_gesture_handler.cc
+++ b/ash/wm/gestures/overview_gesture_handler.cc
@@ -6,13 +6,13 @@
#include "ash/metrics/user_metrics_recorder.h"
#include "ash/shell.h"
-#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/overview/window_selector_controller.h"
#include "ui/aura/window.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/screen.h"
+#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
namespace {
@@ -84,7 +84,7 @@ bool OverviewGestureHandler::ProcessGestureEvent(
event.details().touch_points() == 1) {
gfx::Point point_in_screen(event.location());
aura::Window* target = static_cast<aura::Window*>(event.target());
- wm::ConvertPointToScreen(target, &point_in_screen);
+ ::wm::ConvertPointToScreen(target, &point_in_screen);
in_top_bezel_gesture_ = !Shell::GetScreen()->GetDisplayNearestPoint(
point_in_screen).bounds().y() + kTopBezelExtraPixels >
point_in_screen.y();
diff --git a/ash/wm/panels/panel_window_resizer.cc b/ash/wm/panels/panel_window_resizer.cc
index 14632b6..a57ac59 100644
--- a/ash/wm/panels/panel_window_resizer.cc
+++ b/ash/wm/panels/panel_window_resizer.cc
@@ -11,7 +11,6 @@
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/panels/panel_layout_manager.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
@@ -26,6 +25,7 @@
#include "ui/base/ui_base_types.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
+#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
@@ -51,7 +51,7 @@ PanelWindowResizer::Create(WindowResizer* next_window_resizer,
void PanelWindowResizer::Drag(const gfx::Point& location, int event_flags) {
last_location_ = location;
- wm::ConvertPointToScreen(GetTarget()->parent(), &last_location_);
+ ::wm::ConvertPointToScreen(GetTarget()->parent(), &last_location_);
if (!did_move_or_resize_) {
did_move_or_resize_ = true;
StartedDragging();
diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc
index 08ff0c4..fbdc29c 100644
--- a/ash/wm/window_resizer.cc
+++ b/ash/wm/window_resizer.cc
@@ -20,6 +20,7 @@
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
+#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
@@ -204,7 +205,7 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag(
// for the current display but the window can move to a different one.
aura::Window* parent = GetTarget()->parent();
gfx::Point passed_location_in_screen(passed_location);
- wm::ConvertPointToScreen(parent, &passed_location_in_screen);
+ ::wm::ConvertPointToScreen(parent, &passed_location_in_screen);
gfx::Rect near_passed_location(passed_location_in_screen, gfx::Size());
// Use a pointer location (matching the logic in DragWindowResizer) to
// calculate the target display after the drag.
diff --git a/ash/wm/workspace/multi_window_resize_controller.cc b/ash/wm/workspace/multi_window_resize_controller.cc
index d03cfa1..34af90b 100644
--- a/ash/wm/workspace/multi_window_resize_controller.cc
+++ b/ash/wm/workspace/multi_window_resize_controller.cc
@@ -7,7 +7,6 @@
#include "ash/screen_util.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/window_animations.h"
#include "ash/wm/workspace/workspace_event_handler.h"
#include "ash/wm/workspace/workspace_window_resizer.h"
@@ -25,6 +24,7 @@
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/wm/core/compound_event_filter.h"
+#include "ui/wm/core/coordinate_conversion.h"
using aura::Window;
@@ -228,7 +228,7 @@ MultiWindowResizeController::DetermineWindowsFromScreenPoint(
aura::Window* window) const {
gfx::Point mouse_location(
gfx::Screen::GetScreenFor(window)->GetCursorScreenPoint());
- wm::ConvertPointFromScreen(window, &mouse_location);
+ ::wm::ConvertPointFromScreen(window, &mouse_location);
const int component =
window->delegate()->GetNonClientComponent(mouse_location);
return DetermineWindows(window, component, mouse_location);
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index c82acf2..395c2ad 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -15,7 +15,6 @@
#include "ash/screen_util.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
-#include "ash/wm/coordinate_conversion.h"
#include "ash/wm/default_window_resizer.h"
#include "ash/wm/dock/docked_window_layout_manager.h"
#include "ash/wm/dock/docked_window_resizer.h"
@@ -37,6 +36,7 @@
#include "ui/compositor/layer.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/transform.h"
+#include "ui/wm/core/coordinate_conversion.h"
#include "ui/wm/core/window_util.h"
#include "ui/wm/public/window_types.h"
@@ -371,7 +371,7 @@ void WorkspaceWindowResizer::Drag(const gfx::Point& location_in_parent,
}
gfx::Point location_in_screen = location_in_parent;
- wm::ConvertPointToScreen(GetTarget()->parent(), &location_in_screen);
+ ::wm::ConvertPointToScreen(GetTarget()->parent(), &location_in_screen);
aura::Window* root = NULL;
gfx::Display display =
@@ -771,8 +771,8 @@ void WorkspaceWindowResizer::AdjustBoundsForMainWindow(
int sticky_size,
gfx::Rect* bounds) {
gfx::Point last_mouse_location_in_screen = last_mouse_location_;
- wm::ConvertPointToScreen(GetTarget()->parent(),
- &last_mouse_location_in_screen);
+ ::wm::ConvertPointToScreen(GetTarget()->parent(),
+ &last_mouse_location_in_screen);
gfx::Display display = Shell::GetScreen()->GetDisplayNearestPoint(
last_mouse_location_in_screen);
gfx::Rect work_area =