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

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

Issue 1479923002: Enumerate the return value of dispatchEvent so it is clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_passive_uma_add
Patch Set: Fix typo Created 4 years, 9 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/events/InputEvent.h" 5 #include "core/events/InputEvent.h"
6 6
7 #include "core/events/EventDispatcher.h" 7 #include "core/events/EventDispatcher.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
11 InputEvent::InputEvent() 11 InputEvent::InputEvent()
12 { 12 {
13 } 13 }
14 14
15 InputEvent::InputEvent(const AtomicString& type, const InputEventInit& initializ er) 15 InputEvent::InputEvent(const AtomicString& type, const InputEventInit& initializ er)
16 : UIEvent(type, initializer) 16 : UIEvent(type, initializer)
17 { 17 {
18 } 18 }
19 19
20 PassRefPtrWillBeRawPtr<EventDispatchMediator> InputEvent::createMediator()
21 {
22 return InputEventDispatchMediator::create(this);
23 }
24
25 bool InputEvent::isInputEvent() const 20 bool InputEvent::isInputEvent() const
26 { 21 {
27 return true; 22 return true;
28 } 23 }
29 24
30 DEFINE_TRACE(InputEvent) 25 DEFINE_TRACE(InputEvent)
31 { 26 {
32 UIEvent::trace(visitor); 27 UIEvent::trace(visitor);
33 } 28 }
34 29
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 30 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/InputEvent.h ('k') | third_party/WebKit/Source/core/events/KeyboardEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698