summaryrefslogtreecommitdiffstats
path: root/ash/wm/coordinate_conversion.cc
diff options
context:
space:
mode:
authorrobliao@chromium.org <robliao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-05 22:49:31 +0000
committerrobliao@chromium.org <robliao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-05 22:49:31 +0000
commit7804332edadb7aea91137aeac932d512d9104ebd (patch)
tree10f00b00a044dffbee15ecf53bff1792a38110e9 /ash/wm/coordinate_conversion.cc
parentb315e837d887efecbefed6ad06ef72e655dc4b99 (diff)
downloadchromium_src-7804332edadb7aea91137aeac932d512d9104ebd.zip
chromium_src-7804332edadb7aea91137aeac932d512d9104ebd.tar.gz
chromium_src-7804332edadb7aea91137aeac932d512d9104ebd.tar.bz2
Revert of Moving coordinate conversion methods from ash/wm to ui/wm. (https://codereview.chromium.org/425363002/)
Reason for revert: Build break. ../../ash/display/mouse_cursor_event_filter_ozone.cc:21:7:error: no member named 'ConvertPointToScreen' in namespace 'ash::wm' wm::ConvertPointToScreen(target, &point_in_screen); ~~~~^ ../../ash/display/mouse_cursor_event_filter_ozone.cc:45:7:error: no member named 'ConvertPointFromScreen' in namespace 'ash::wm' wm::ConvertPointFromScreen(root_at_point, &point_in_root); ~~~~^ ../../ash/display/mouse_cursor_event_filter_ozone.cc:86:7:error: no member named 'ConvertPointFromScreen' in namespace 'ash::wm' wm::ConvertPointFromScreen(dst_root, &point_in_dst_screen); ~~~~^ Original issue's description: > Moving coordinate conversion methods from ash/wm to ui/wm. > > Moving ConvertPointToScreen and ConvertPointFromScreen from ash::wm into > aura::Window. The suggestion to do this was made here: > https://codereview.chromium.org/420603011/diff/1/athena/wm/coordinate_conversion.h > > BUG=NONE > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287609 TBR=oshima@chromium.org,ben@chromium.org,sky@chromium.org,mfomitchev@chromium.org NOTREECHECKS=true NOTRY=true BUG=NONE Review URL: https://codereview.chromium.org/445703005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287626 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/coordinate_conversion.cc')
-rw-r--r--ash/wm/coordinate_conversion.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/ash/wm/coordinate_conversion.cc b/ash/wm/coordinate_conversion.cc
index 258f976..991e7d4 100644
--- a/ash/wm/coordinate_conversion.cc
+++ b/ash/wm/coordinate_conversion.cc
@@ -31,5 +31,17 @@ 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