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

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

Issue 181153003: Make Event RefCountedGarbageCollected and implement trace() methods to the Event hierarcy (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 unsigned deltaMode() const { return m_deltaMode; } 90 unsigned deltaMode() const { return m_deltaMode; }
91 float ticksX() const { return static_cast<float>(m_wheelDelta.x()) / TickMul tiplier; } 91 float ticksX() const { return static_cast<float>(m_wheelDelta.x()) / TickMul tiplier; }
92 float ticksY() const { return static_cast<float>(m_wheelDelta.y()) / TickMul tiplier; } 92 float ticksY() const { return static_cast<float>(m_wheelDelta.y()) / TickMul tiplier; }
93 93
94 bool webkitDirectionInvertedFromDevice() const { return m_directionInvertedF romDevice; } 94 bool webkitDirectionInvertedFromDevice() const { return m_directionInvertedF romDevice; }
95 95
96 virtual const AtomicString& interfaceName() const OVERRIDE; 96 virtual const AtomicString& interfaceName() const OVERRIDE;
97 virtual bool isMouseEvent() const OVERRIDE; 97 virtual bool isMouseEvent() const OVERRIDE;
98 virtual bool isWheelEvent() const OVERRIDE; 98 virtual bool isWheelEvent() const OVERRIDE;
99 99
100 virtual void trace(Visitor*) OVERRIDE;
101
100 private: 102 private:
101 WheelEvent(); 103 WheelEvent();
102 WheelEvent(const AtomicString&, const WheelEventInit&); 104 WheelEvent(const AtomicString&, const WheelEventInit&);
103 WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, 105 WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
104 unsigned, PassRefPtr<AbstractView>, const IntPoint& screenLocation, cons t IntPoint& pageLocation, 106 unsigned, PassRefPtr<AbstractView>, const IntPoint& screenLocation, cons t IntPoint& pageLocation,
105 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionIn vertedFromDevice); 107 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool directionIn vertedFromDevice);
106 108
107 IntPoint m_wheelDelta; 109 IntPoint m_wheelDelta;
108 double m_deltaX; 110 double m_deltaX;
109 double m_deltaY; 111 double m_deltaY;
110 double m_deltaZ; 112 double m_deltaZ;
111 unsigned m_deltaMode; 113 unsigned m_deltaMode;
112 bool m_directionInvertedFromDevice; 114 bool m_directionInvertedFromDevice;
113 }; 115 };
114 116
115 DEFINE_EVENT_TYPE_CASTS(WheelEvent); 117 DEFINE_EVENT_TYPE_CASTS(WheelEvent);
116 118
117 class WheelEventDispatchMediator FINAL : public EventDispatchMediator { 119 class WheelEventDispatchMediator FINAL : public EventDispatchMediator {
118 public: 120 public:
119 static PassRefPtr<WheelEventDispatchMediator> create(const PlatformWheelEven t&, PassRefPtr<AbstractView>); 121 static PassRefPtr<WheelEventDispatchMediator> create(const PlatformWheelEven t&, PassRefPtr<AbstractView>);
120 private: 122 private:
121 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractVie w>); 123 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractVie w>);
122 WheelEvent* event() const; 124 WheelEvent* event() const;
123 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; 125 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
124 }; 126 };
125 127
126 } // namespace WebCore 128 } // namespace WebCore
127 129
128 #endif // WheelEvent_h 130 #endif // WheelEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698