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

Side by Side Diff: Source/core/events/WheelEvent.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/WebKitAnimationEvent.h ('k') | no next file » | 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, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 6 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 26 matching lines...) Expand all
37 WheelEventInit(); 37 WheelEventInit();
38 38
39 double deltaX; 39 double deltaX;
40 double deltaY; 40 double deltaY;
41 double deltaZ; 41 double deltaZ;
42 int wheelDeltaX; // Deprecated. 42 int wheelDeltaX; // Deprecated.
43 int wheelDeltaY; // Deprecated. 43 int wheelDeltaY; // Deprecated.
44 unsigned deltaMode; 44 unsigned deltaMode;
45 }; 45 };
46 46
47 class WheelEvent FINAL : public MouseEvent { 47 class WheelEvent final : public MouseEvent {
48 DEFINE_WRAPPERTYPEINFO(); 48 DEFINE_WRAPPERTYPEINFO();
49 public: 49 public:
50 enum { TickMultiplier = 120 }; 50 enum { TickMultiplier = 120 };
51 51
52 enum DeltaMode { 52 enum DeltaMode {
53 DOM_DELTA_PIXEL = 0, 53 DOM_DELTA_PIXEL = 0,
54 DOM_DELTA_LINE, 54 DOM_DELTA_LINE,
55 DOM_DELTA_PAGE 55 DOM_DELTA_PAGE
56 }; 56 };
57 57
(...skipping 19 matching lines...) Expand all
77 double deltaX() const { return m_deltaX; } // Positive when scrolling right. 77 double deltaX() const { return m_deltaX; } // Positive when scrolling right.
78 double deltaY() const { return m_deltaY; } // Positive when scrolling down. 78 double deltaY() const { return m_deltaY; } // Positive when scrolling down.
79 double deltaZ() const { return m_deltaZ; } 79 double deltaZ() const { return m_deltaZ; }
80 int wheelDelta() const { return wheelDeltaY() ? wheelDeltaY() : wheelDeltaX( ); } // Deprecated. 80 int wheelDelta() const { return wheelDeltaY() ? wheelDeltaY() : wheelDeltaX( ); } // Deprecated.
81 int wheelDeltaX() const { return m_wheelDelta.x(); } // Deprecated, negative when scrolling right. 81 int wheelDeltaX() const { return m_wheelDelta.x(); } // Deprecated, negative when scrolling right.
82 int wheelDeltaY() const { return m_wheelDelta.y(); } // Deprecated, negative when scrolling down. 82 int wheelDeltaY() const { return m_wheelDelta.y(); } // Deprecated, negative when scrolling down.
83 unsigned deltaMode() const { return m_deltaMode; } 83 unsigned deltaMode() const { return m_deltaMode; }
84 float ticksX() const { return static_cast<float>(m_wheelDelta.x()) / TickMul tiplier; } 84 float ticksX() const { return static_cast<float>(m_wheelDelta.x()) / TickMul tiplier; }
85 float ticksY() const { return static_cast<float>(m_wheelDelta.y()) / TickMul tiplier; } 85 float ticksY() const { return static_cast<float>(m_wheelDelta.y()) / TickMul tiplier; }
86 86
87 virtual const AtomicString& interfaceName() const OVERRIDE; 87 virtual const AtomicString& interfaceName() const override;
88 virtual bool isMouseEvent() const OVERRIDE; 88 virtual bool isMouseEvent() const override;
89 virtual bool isWheelEvent() const OVERRIDE; 89 virtual bool isWheelEvent() const override;
90 90
91 virtual void trace(Visitor*) OVERRIDE; 91 virtual void trace(Visitor*) override;
92 92
93 private: 93 private:
94 WheelEvent(); 94 WheelEvent();
95 WheelEvent(const AtomicString&, const WheelEventInit&); 95 WheelEvent(const AtomicString&, const WheelEventInit&);
96 WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, 96 WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
97 unsigned, PassRefPtrWillBeRawPtr<AbstractView>, const IntPoint& screenLo cation, const IntPoint& pageLocation, 97 unsigned, PassRefPtrWillBeRawPtr<AbstractView>, const IntPoint& screenLo cation, const IntPoint& pageLocation,
98 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); 98 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
99 99
100 IntPoint m_wheelDelta; 100 IntPoint m_wheelDelta;
101 double m_deltaX; 101 double m_deltaX;
102 double m_deltaY; 102 double m_deltaY;
103 double m_deltaZ; 103 double m_deltaZ;
104 unsigned m_deltaMode; 104 unsigned m_deltaMode;
105 }; 105 };
106 106
107 DEFINE_EVENT_TYPE_CASTS(WheelEvent); 107 DEFINE_EVENT_TYPE_CASTS(WheelEvent);
108 108
109 class WheelEventDispatchMediator FINAL : public EventDispatchMediator { 109 class WheelEventDispatchMediator final : public EventDispatchMediator {
110 public: 110 public:
111 static PassRefPtrWillBeRawPtr<WheelEventDispatchMediator> create(const Platf ormWheelEvent&, PassRefPtrWillBeRawPtr<AbstractView>); 111 static PassRefPtrWillBeRawPtr<WheelEventDispatchMediator> create(const Platf ormWheelEvent&, PassRefPtrWillBeRawPtr<AbstractView>);
112 private: 112 private:
113 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtrWillBeRawPtr <AbstractView>); 113 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtrWillBeRawPtr <AbstractView>);
114 WheelEvent* event() const; 114 WheelEvent* event() const;
115 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; 115 virtual bool dispatchEvent(EventDispatcher*) const override;
116 }; 116 };
117 117
118 } // namespace blink 118 } // namespace blink
119 119
120 #endif // WheelEvent_h 120 #endif // WheelEvent_h
OLDNEW
« no previous file with comments | « Source/core/events/WebKitAnimationEvent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698