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

Side by Side Diff: Source/core/events/TouchEvent.h

Issue 133133006: Update Event classes to use OVERRIDE / FINAL when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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
« no previous file with comments | « Source/core/events/TextEvent.h ('k') | Source/core/events/TransitionEvent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008, The Android Open Source Project 2 * Copyright 2008, The Android Open Source Project
3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright 10 * * Redistributions in binary form must reproduce the above copyright
(...skipping 15 matching lines...) Expand all
26 26
27 #ifndef TouchEvent_h 27 #ifndef TouchEvent_h
28 #define TouchEvent_h 28 #define TouchEvent_h
29 29
30 #include "core/events/EventDispatchMediator.h" 30 #include "core/events/EventDispatchMediator.h"
31 #include "core/events/MouseRelatedEvent.h" 31 #include "core/events/MouseRelatedEvent.h"
32 #include "core/dom/TouchList.h" 32 #include "core/dom/TouchList.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 class TouchEvent : public MouseRelatedEvent { 36 class TouchEvent FINAL : public MouseRelatedEvent {
37 public: 37 public:
38 virtual ~TouchEvent(); 38 virtual ~TouchEvent();
39 39
40 static PassRefPtr<TouchEvent> create() 40 static PassRefPtr<TouchEvent> create()
41 { 41 {
42 return adoptRef(new TouchEvent); 42 return adoptRef(new TouchEvent);
43 } 43 }
44 static PassRefPtr<TouchEvent> create(TouchList* touches, 44 static PassRefPtr<TouchEvent> create(TouchList* touches,
45 TouchList* targetTouches, TouchList* changedTouches, 45 TouchList* targetTouches, TouchList* changedTouches,
46 const AtomicString& type, PassRefPtr<AbstractView> view, 46 const AtomicString& type, PassRefPtr<AbstractView> view,
(...skipping 14 matching lines...) Expand all
61 TouchList* touches() const { return m_touches.get(); } 61 TouchList* touches() const { return m_touches.get(); }
62 TouchList* targetTouches() const { return m_targetTouches.get(); } 62 TouchList* targetTouches() const { return m_targetTouches.get(); }
63 TouchList* changedTouches() const { return m_changedTouches.get(); } 63 TouchList* changedTouches() const { return m_changedTouches.get(); }
64 64
65 void setTouches(PassRefPtr<TouchList> touches) { m_touches = touches; } 65 void setTouches(PassRefPtr<TouchList> touches) { m_touches = touches; }
66 void setTargetTouches(PassRefPtr<TouchList> targetTouches) { m_targetTouches = targetTouches; } 66 void setTargetTouches(PassRefPtr<TouchList> targetTouches) { m_targetTouches = targetTouches; }
67 void setChangedTouches(PassRefPtr<TouchList> changedTouches) { m_changedTouc hes = changedTouches; } 67 void setChangedTouches(PassRefPtr<TouchList> changedTouches) { m_changedTouc hes = changedTouches; }
68 68
69 virtual bool isTouchEvent() const OVERRIDE; 69 virtual bool isTouchEvent() const OVERRIDE;
70 70
71 virtual const AtomicString& interfaceName() const; 71 virtual const AtomicString& interfaceName() const OVERRIDE;
72 72
73 private: 73 private:
74 TouchEvent(); 74 TouchEvent();
75 TouchEvent(TouchList* touches, TouchList* targetTouches, 75 TouchEvent(TouchList* touches, TouchList* targetTouches,
76 TouchList* changedTouches, const AtomicString& type, 76 TouchList* changedTouches, const AtomicString& type,
77 PassRefPtr<AbstractView>, int screenX, int screenY, int pageX, 77 PassRefPtr<AbstractView>, int screenX, int screenY, int pageX,
78 int pageY, 78 int pageY,
79 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); 79 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
80 80
81 RefPtr<TouchList> m_touches; 81 RefPtr<TouchList> m_touches;
82 RefPtr<TouchList> m_targetTouches; 82 RefPtr<TouchList> m_targetTouches;
83 RefPtr<TouchList> m_changedTouches; 83 RefPtr<TouchList> m_changedTouches;
84 }; 84 };
85 85
86 class TouchEventDispatchMediator : public EventDispatchMediator { 86 class TouchEventDispatchMediator FINAL : public EventDispatchMediator {
87 public: 87 public:
88 static PassRefPtr<TouchEventDispatchMediator> create(PassRefPtr<TouchEvent>) ; 88 static PassRefPtr<TouchEventDispatchMediator> create(PassRefPtr<TouchEvent>) ;
89 89
90 private: 90 private:
91 explicit TouchEventDispatchMediator(PassRefPtr<TouchEvent>); 91 explicit TouchEventDispatchMediator(PassRefPtr<TouchEvent>);
92 TouchEvent* event() const; 92 TouchEvent* event() const;
93 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; 93 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
94 }; 94 };
95 95
96 DEFINE_EVENT_TYPE_CASTS(TouchEvent); 96 DEFINE_EVENT_TYPE_CASTS(TouchEvent);
97 97
98 } // namespace WebCore 98 } // namespace WebCore
99 99
100 #endif // TouchEvent_h 100 #endif // TouchEvent_h
OLDNEW
« no previous file with comments | « Source/core/events/TextEvent.h ('k') | Source/core/events/TransitionEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698