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

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: Fixing layout test 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..9d39886ba83116fb5f9293e08bfb56e11df9036f
--- /dev/null
+++ b/third_party/WebKit/Source/core/events/InputEvent.h
@@ -0,0 +1,56 @@
+// 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));
+ }
+
+ const String& inputType() const { return m_inputType; }
dtapuska 2016/02/09 15:49:12 I think this isn't necessary
+
+ bool isInputEvent() const override;
+
+ PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator() override;
+
+ DECLARE_VIRTUAL_TRACE();
+
+private:
+ InputEvent();
+ InputEvent(const AtomicString&, const InputEventInit&);
+
+ String m_inputType;
dtapuska 2016/02/09 15:49:12 Where is the variable assigned?
+};
+
+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

Powered by Google App Engine
This is Rietveld 408576698