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

Unified Diff: ui/aura/root_window_host_ozone.cc

Issue 158023006: Adding Ozone CursorLoader and necessary API functions to allow setting the cursor in SoftwareFactor… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed cursor*_null.* Created 6 years, 10 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 | « no previous file | ui/base/cursor/cursor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_host_ozone.cc
diff --git a/ui/aura/root_window_host_ozone.cc b/ui/aura/root_window_host_ozone.cc
index 9af68e9cb33782f39be6f9d3eaf0f7e8a4f99466..8fb66f68e22e6ba873a69c8ab58212e1c5953c24 100644
--- a/ui/aura/root_window_host_ozone.cc
+++ b/ui/aura/root_window_host_ozone.cc
@@ -38,6 +38,13 @@ WindowTreeHostOzone::~WindowTreeHostOzone() {
uint32_t WindowTreeHostOzone::Dispatch(const base::NativeEvent& ne) {
ui::Event* event = static_cast<ui::Event*>(ne);
+
+ if (event->type() == ui::ET_MOUSE_MOVED) {
dnicoara 2014/02/12 16:18:19 Removed as per our offline discussion.
+ ui::MouseEvent* mouse_event = static_cast<ui::MouseEvent*>(event);
+ gfx::SurfaceFactoryOzone::GetInstance()->MoveCursorTo(
+ mouse_event->location());
+ }
+
ui::EventDispatchDetails details ALLOW_UNUSED = SendEventToProcessor(event);
return POST_DISPATCH_NONE;
}
@@ -77,7 +84,7 @@ void WindowTreeHostOzone::SetCapture() { NOTIMPLEMENTED(); }
void WindowTreeHostOzone::ReleaseCapture() { NOTIMPLEMENTED(); }
void WindowTreeHostOzone::SetCursor(gfx::NativeCursor cursor) {
- NOTIMPLEMENTED();
+ gfx::SurfaceFactoryOzone::GetInstance()->SetCursorImage(*cursor.platform());
}
bool WindowTreeHostOzone::QueryMouseLocation(gfx::Point* location_return) {
@@ -97,7 +104,7 @@ void WindowTreeHostOzone::OnCursorVisibilityChanged(bool show) {
}
void WindowTreeHostOzone::MoveCursorTo(const gfx::Point& location) {
- NOTIMPLEMENTED();
+ gfx::SurfaceFactoryOzone::GetInstance()->MoveCursorTo(location);
}
void WindowTreeHostOzone::PostNativeEvent(
« no previous file with comments | « no previous file | ui/base/cursor/cursor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698