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

Unified Diff: ui/wm/core/coordinate_conversion.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 | « ui/wm/core/coordinate_conversion.h ('k') | ui/wm/wm.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/coordinate_conversion.cc
diff --git a/ui/wm/core/coordinate_conversion.cc b/ui/wm/core/coordinate_conversion.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6227b3783dd248f4b49173dd8c0f041228b1a919
--- /dev/null
+++ b/ui/wm/core/coordinate_conversion.cc
@@ -0,0 +1,29 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/wm/core/coordinate_conversion.h"
+
+#include "ui/aura/client/screen_position_client.h"
+#include "ui/gfx/point.h"
+
+namespace wm {
+
+void ConvertPointToScreen(const aura::Window* window, gfx::Point* point) {
+ DCHECK(window);
+ DCHECK(window->GetRootWindow());
+ DCHECK(aura::client::GetScreenPositionClient(window->GetRootWindow()));
+ aura::client::GetScreenPositionClient(window->GetRootWindow())->
+ ConvertPointToScreen(window, point);
+}
+
+void ConvertPointFromScreen(const aura::Window* window,
+ gfx::Point* point_in_screen) {
+ DCHECK(window);
+ DCHECK(window->GetRootWindow());
+ DCHECK(aura::client::GetScreenPositionClient(window->GetRootWindow()));
+ aura::client::GetScreenPositionClient(window->GetRootWindow())->
+ ConvertPointFromScreen(window, point_in_screen);
+}
+
+} // namespace wm
« no previous file with comments | « ui/wm/core/coordinate_conversion.h ('k') | ui/wm/wm.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698