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

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

Issue 636833002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/MessageEvent.h ('k') | Source/core/events/MouseRelatedEvent.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 (C) 2001 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 EventTarget* relatedTarget() const { return m_relatedTarget.get(); } 81 EventTarget* relatedTarget() const { return m_relatedTarget.get(); }
82 void setRelatedTarget(PassRefPtrWillBeRawPtr<EventTarget> relatedTarget) { m _relatedTarget = relatedTarget; } 82 void setRelatedTarget(PassRefPtrWillBeRawPtr<EventTarget> relatedTarget) { m _relatedTarget = relatedTarget; }
83 83
84 Node* toElement() const; 84 Node* toElement() const;
85 Node* fromElement() const; 85 Node* fromElement() const;
86 86
87 DataTransfer* dataTransfer() const { return isDragEvent() ? m_dataTransfer.g et() : 0; } 87 DataTransfer* dataTransfer() const { return isDragEvent() ? m_dataTransfer.g et() : 0; }
88 88
89 bool fromTouch() const { return m_syntheticEventType == PlatformMouseEvent:: FromTouch; } 89 bool fromTouch() const { return m_syntheticEventType == PlatformMouseEvent:: FromTouch; }
90 90
91 virtual const AtomicString& interfaceName() const OVERRIDE; 91 virtual const AtomicString& interfaceName() const override;
92 92
93 virtual bool isMouseEvent() const OVERRIDE; 93 virtual bool isMouseEvent() const override;
94 virtual bool isDragEvent() const OVERRIDE FINAL; 94 virtual bool isDragEvent() const override final;
95 virtual int which() const OVERRIDE FINAL; 95 virtual int which() const override final;
96 96
97 virtual void trace(Visitor*) OVERRIDE; 97 virtual void trace(Visitor*) override;
98 98
99 protected: 99 protected:
100 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe fPtrWillBeRawPtr<AbstractView>, 100 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe fPtrWillBeRawPtr<AbstractView>,
101 int detail, int screenX, int screenY, int pageX, int pageY, 101 int detail, int screenX, int screenY, int pageX, int pageY,
102 int movementX, int movementY, 102 int movementX, int movementY,
103 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b utton, 103 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b utton,
104 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPt r<DataTransfer>, 104 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPt r<DataTransfer>,
105 bool isSimulated, PlatformMouseEvent::SyntheticEventType); 105 bool isSimulated, PlatformMouseEvent::SyntheticEventType);
106 106
107 MouseEvent(const AtomicString& type, const MouseEventInit&); 107 MouseEvent(const AtomicString& type, const MouseEventInit&);
108 108
109 MouseEvent(); 109 MouseEvent();
110 110
111 private: 111 private:
112 unsigned short m_button; 112 unsigned short m_button;
113 bool m_buttonDown; 113 bool m_buttonDown;
114 RefPtrWillBeMember<EventTarget> m_relatedTarget; 114 RefPtrWillBeMember<EventTarget> m_relatedTarget;
115 RefPtrWillBeMember<DataTransfer> m_dataTransfer; 115 RefPtrWillBeMember<DataTransfer> m_dataTransfer;
116 PlatformMouseEvent::SyntheticEventType m_syntheticEventType; 116 PlatformMouseEvent::SyntheticEventType m_syntheticEventType;
117 }; 117 };
118 118
119 class SimulatedMouseEvent FINAL : public MouseEvent { 119 class SimulatedMouseEvent final : public MouseEvent {
120 public: 120 public:
121 static PassRefPtrWillBeRawPtr<SimulatedMouseEvent> create(const AtomicString & eventType, PassRefPtrWillBeRawPtr<AbstractView>, PassRefPtrWillBeRawPtr<Event> underlyingEvent); 121 static PassRefPtrWillBeRawPtr<SimulatedMouseEvent> create(const AtomicString & eventType, PassRefPtrWillBeRawPtr<AbstractView>, PassRefPtrWillBeRawPtr<Event> underlyingEvent);
122 virtual ~SimulatedMouseEvent(); 122 virtual ~SimulatedMouseEvent();
123 123
124 virtual void trace(Visitor*) OVERRIDE; 124 virtual void trace(Visitor*) override;
125 125
126 private: 126 private:
127 SimulatedMouseEvent(const AtomicString& eventType, PassRefPtrWillBeRawPtr<Ab stractView>, PassRefPtrWillBeRawPtr<Event> underlyingEvent); 127 SimulatedMouseEvent(const AtomicString& eventType, PassRefPtrWillBeRawPtr<Ab stractView>, PassRefPtrWillBeRawPtr<Event> underlyingEvent);
128 }; 128 };
129 129
130 class MouseEventDispatchMediator FINAL : public EventDispatchMediator { 130 class MouseEventDispatchMediator final : public EventDispatchMediator {
131 public: 131 public:
132 enum MouseEventType { SyntheticMouseEvent, NonSyntheticMouseEvent}; 132 enum MouseEventType { SyntheticMouseEvent, NonSyntheticMouseEvent};
133 static PassRefPtrWillBeRawPtr<MouseEventDispatchMediator> create(PassRefPtrW illBeRawPtr<MouseEvent>, MouseEventType = NonSyntheticMouseEvent); 133 static PassRefPtrWillBeRawPtr<MouseEventDispatchMediator> create(PassRefPtrW illBeRawPtr<MouseEvent>, MouseEventType = NonSyntheticMouseEvent);
134 134
135 private: 135 private:
136 explicit MouseEventDispatchMediator(PassRefPtrWillBeRawPtr<MouseEvent>, Mous eEventType); 136 explicit MouseEventDispatchMediator(PassRefPtrWillBeRawPtr<MouseEvent>, Mous eEventType);
137 MouseEvent* event() const; 137 MouseEvent* event() const;
138 138
139 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; 139 virtual bool dispatchEvent(EventDispatcher*) const override;
140 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou seEvent; } 140 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou seEvent; }
141 MouseEventType m_mouseEventType; 141 MouseEventType m_mouseEventType;
142 }; 142 };
143 143
144 DEFINE_EVENT_TYPE_CASTS(MouseEvent); 144 DEFINE_EVENT_TYPE_CASTS(MouseEvent);
145 145
146 } // namespace blink 146 } // namespace blink
147 147
148 #endif // MouseEvent_h 148 #endif // MouseEvent_h
OLDNEW
« no previous file with comments | « Source/core/events/MessageEvent.h ('k') | Source/core/events/MouseRelatedEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698