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

Side by Side Diff: third_party/WebKit/Source/core/events/InputEvent.cpp

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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "core/events/InputEvent.h"
6
7 #include "core/events/EventDispatcher.h"
8
9 namespace blink {
10
11 InputEvent::InputEvent()
12 {
13 }
14
15 InputEvent::InputEvent(const AtomicString& type, const InputEventInit& initializ er)
16 : UIEvent(type, initializer)
17 {
18 }
19
20 PassRefPtrWillBeRawPtr<EventDispatchMediator> InputEvent::createMediator()
21 {
22 return InputEventDispatchMediator::create(this);
23 }
24
25 bool InputEvent::isInputEvent() const
26 {
27 return true;
28 }
29
30 DEFINE_TRACE(InputEvent)
31 {
32 UIEvent::trace(visitor);
33 }
34
35 PassRefPtrWillBeRawPtr<InputEventDispatchMediator> InputEventDispatchMediator::c reate(PassRefPtrWillBeRawPtr<InputEvent> inputEvent)
36 {
37 return adoptRefWillBeNoop(new InputEventDispatchMediator(inputEvent));
38 }
39
40 InputEventDispatchMediator::InputEventDispatchMediator(PassRefPtrWillBeRawPtr<In putEvent> inputEvent)
41 : EventDispatchMediator(inputEvent)
42 {
43 }
44
45 InputEvent& InputEventDispatchMediator::event() const
46 {
47 return toInputEvent(EventDispatchMediator::event());
48 }
49
50 bool InputEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons t
51 {
52 return EventDispatchMediator::dispatchEvent(dispatcher) && !event().defaultH andled();
53 }
54
55 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/InputEvent.h ('k') | third_party/WebKit/Source/core/events/InputEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698