Index: Source/core/events/UIEvent.h |
diff --git a/Source/core/events/UIEvent.h b/Source/core/events/UIEvent.h |
index 860e961f91099353348f439497d87935577cd1c7..c22ce42c4beea417bb8967bff0b69f96d77777ff 100644 |
--- a/Source/core/events/UIEvent.h |
+++ b/Source/core/events/UIEvent.h |
@@ -27,9 +27,12 @@ |
#include "core/CoreExport.h" |
#include "core/events/Event.h" |
#include "core/events/EventDispatchMediator.h" |
+#include "core/events/InputDevice.h" |
#include "core/events/UIEventInit.h" |
#include "core/frame/DOMWindow.h" |
+#include <stdlib.h> |
tdresser
2015/06/01 17:36:46
What's stdlib being used for?
lanwei
2015/06/02 14:08:30
Done.
|
+ |
namespace blink { |
// FIXME: Get rid of this typedef. |
@@ -56,6 +59,10 @@ public: |
AbstractView* view() const { return m_view.get(); } |
int detail() const { return m_detail; } |
+ InputDevice* sourceDevice() const |
+ { |
+ return m_sourceDevice ? m_sourceDevice.get() : InputDevice::create().get(); |
+ } |
virtual const AtomicString& interfaceName() const override; |
virtual bool isUIEvent() const override final; |
@@ -81,6 +88,7 @@ protected: |
private: |
RefPtrWillBeMember<AbstractView> m_view; |
int m_detail; |
+ RefPtrWillBeMember<InputDevice> m_sourceDevice; |
}; |
} // namespace blink |