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

Unified Diff: third_party/WebKit/Source/core/events/InputEvent.h

Issue 1682683002: [InputEvent] Add InputEvent with basic interface behind a flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
Index: third_party/WebKit/Source/core/events/InputEvent.h
diff --git a/third_party/WebKit/Source/core/events/InputEvent.h b/third_party/WebKit/Source/core/events/InputEvent.h
new file mode 100644
index 0000000000000000000000000000000000000000..4cbffbea6e5fb1cc5211de8c26522eb5d3e277f1
--- /dev/null
+++ b/third_party/WebKit/Source/core/events/InputEvent.h
@@ -0,0 +1,52 @@
+// Copyright 2016 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.
+
+#ifndef InputEvent_h
+#define InputEvent_h
+
+#include "core/events/InputEventInit.h"
+#include "core/events/UIEvent.h"
+
+namespace blink {
+
+class InputEvent final : public UIEvent {
+ DEFINE_WRAPPERTYPEINFO();
+
+public:
+ static PassRefPtrWillBeRawPtr<InputEvent> create()
+ {
+ return adoptRefWillBeNoop(new InputEvent);
+ }
+
+ static PassRefPtrWillBeRawPtr<InputEvent> create(const AtomicString& type, const InputEventInit& initializer)
+ {
+ return adoptRefWillBeNoop(new InputEvent(type, initializer));
+ }
+
+ bool isInputEvent() const override;
+
+ PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator() override;
+
+ DECLARE_VIRTUAL_TRACE();
+
+private:
+ InputEvent();
+ InputEvent(const AtomicString&, const InputEventInit&);
+};
+
+class InputEventDispatchMediator final : public EventDispatchMediator {
+public:
+ static PassRefPtrWillBeRawPtr<InputEventDispatchMediator> create(PassRefPtrWillBeRawPtr<InputEvent>);
+
+private:
+ explicit InputEventDispatchMediator(PassRefPtrWillBeRawPtr<InputEvent>);
+ InputEvent& event() const;
+ bool dispatchEvent(EventDispatcher&) const override;
+};
+
+DEFINE_EVENT_TYPE_CASTS(InputEvent);
+
+} // namespace blink
+
+#endif // InputEvent_h
« no previous file with comments | « third_party/WebKit/Source/core/events/Event.cpp ('k') | third_party/WebKit/Source/core/events/InputEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698