summaryrefslogtreecommitdiffstats
path: root/ash/display
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/display
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/display')
-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
3 files changed, 11 insertions, 10 deletions
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);