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

Unified Diff: ui/aura/window.cc

Issue 10543174: Aura: Add Window::MoveCursorTo() taking relative location to the window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added test. Created 8 years, 6 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
Index: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 1c2554723ede63c285812daa116b96f431580285..758a76741a5489fe5ca707e1fc513c0092636137 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -407,6 +407,14 @@ void Window::ConvertPointToWindow(const Window* source,
ui::Layer::ConvertPointToLayer(source->layer(), target->layer(), point);
}
+void Window::MoveCursorTo(const gfx::Point& point_in_window) {
+ RootWindow* root_window = GetRootWindow();
+ DCHECK(root_window);
+ gfx::Point point_in_root(point_in_window);
+ ConvertPointToWindow(this, root_window, &point_in_root);
+ root_window->MoveCursorTo(point_in_root);
+}
+
gfx::NativeCursor Window::GetCursor(const gfx::Point& point) const {
return delegate_ ? delegate_->GetCursor(point) : gfx::kNullCursor;
}
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura/window_unittest.cc » ('j') | ui/aura/window_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698