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

Unified Diff: sky/engine/core/view/View.cpp

Issue 1129333005: Plumb input events into SkyView (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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: sky/engine/core/view/View.cpp
diff --git a/sky/engine/core/view/View.cpp b/sky/engine/core/view/View.cpp
index 7c45b7ef9b45c9c7e287b48b211c71d809d9ebfd..b8851397954ab71daa5b369bf4138150d534ffb9 100644
--- a/sky/engine/core/view/View.cpp
+++ b/sky/engine/core/view/View.cpp
@@ -38,9 +38,19 @@ void View::schedulePaint()
m_schedulePaintCallback.Run();
}
+void View::setEventCallback(PassOwnPtr<EventCallback> callback)
+{
+ m_eventCallback = callback;
+}
+
void View::setDisplayMetrics(const SkyDisplayMetrics& metrics)
{
m_displayMetrics = metrics;
}
+bool View::handleInputEvent(PassRefPtr<Event> event)
+{
+ return m_eventCallback && m_eventCallback->handleEvent(event.get());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698