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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 /* 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 27 matching lines...) Expand all
38 DEFINE_WRAPPERTYPEINFO(); 38 DEFINE_WRAPPERTYPEINFO();
39 public: 39 public:
40 enum { TickMultiplier = 120 }; 40 enum { TickMultiplier = 120 };
41 41
42 enum DeltaMode { 42 enum DeltaMode {
43 DOM_DELTA_PIXEL = 0, 43 DOM_DELTA_PIXEL = 0,
44 DOM_DELTA_LINE, 44 DOM_DELTA_LINE,
45 DOM_DELTA_PAGE 45 DOM_DELTA_PAGE
46 }; 46 };
47 47
48 static PassRefPtrWillBeRawPtr<WheelEvent> create() 48 static RawPtr<WheelEvent> create()
49 { 49 {
50 return adoptRefWillBeNoop(new WheelEvent); 50 return adoptRefWillBeNoop(new WheelEvent);
51 } 51 }
52 52
53 static PassRefPtrWillBeRawPtr<WheelEvent> create(const PlatformWheelEvent& p latformEvent, PassRefPtrWillBeRawPtr<AbstractView>); 53 static RawPtr<WheelEvent> create(const PlatformWheelEvent& platformEvent, Ra wPtr<AbstractView>);
54 54
55 static PassRefPtrWillBeRawPtr<WheelEvent> create(const AtomicString& type, c onst WheelEventInit& initializer) 55 static RawPtr<WheelEvent> create(const AtomicString& type, const WheelEventI nit& initializer)
56 { 56 {
57 return adoptRefWillBeNoop(new WheelEvent(type, initializer)); 57 return new WheelEvent(type, initializer);
58 } 58 }
59 59
60 static PassRefPtrWillBeRawPtr<WheelEvent> create(const FloatPoint& wheelTick s, 60 static RawPtr<WheelEvent> create(const FloatPoint& wheelTicks,
61 const FloatPoint& rawDelta, unsigned deltaMode, PassRefPtrWillBeRawPtr<A bstractView> view, 61 const FloatPoint& rawDelta, unsigned deltaMode, RawPtr<AbstractView> vie w,
62 const IntPoint& screenLocation, const IntPoint& windowLocation, 62 const IntPoint& screenLocation, const IntPoint& windowLocation,
63 PlatformEvent::Modifiers modifiers, unsigned short buttons, double platf ormTimeStamp, 63 PlatformEvent::Modifiers modifiers, unsigned short buttons, double platf ormTimeStamp,
64 bool canScroll, int resendingPluginId, bool hasPreciseScrollingDeltas, R ailsMode railsMode) 64 bool canScroll, int resendingPluginId, bool hasPreciseScrollingDeltas, R ailsMode railsMode)
65 { 65 {
66 return adoptRefWillBeNoop(new WheelEvent(wheelTicks, rawDelta, deltaMode , view, 66 return new WheelEvent(wheelTicks, rawDelta, deltaMode, view,
67 screenLocation, windowLocation, modifiers, buttons, platformTimeStam p, 67 screenLocation, windowLocation, modifiers, buttons, platformTimeStam p,
68 canScroll, resendingPluginId, hasPreciseScrollingDeltas, railsMode) ); 68 canScroll, resendingPluginId, hasPreciseScrollingDeltas, railsMode) ;
69 } 69 }
70 70
71 double deltaX() const { return m_deltaX; } // Positive when scrolling right. 71 double deltaX() const { return m_deltaX; } // Positive when scrolling right.
72 double deltaY() const { return m_deltaY; } // Positive when scrolling down. 72 double deltaY() const { return m_deltaY; } // Positive when scrolling down.
73 double deltaZ() const { return m_deltaZ; } 73 double deltaZ() const { return m_deltaZ; }
74 int wheelDelta() const { return wheelDeltaY() ? wheelDeltaY() : wheelDeltaX( ); } // Deprecated. 74 int wheelDelta() const { return wheelDeltaY() ? wheelDeltaY() : wheelDeltaX( ); } // Deprecated.
75 int wheelDeltaX() const { return m_wheelDelta.x(); } // Deprecated, negative when scrolling right. 75 int wheelDeltaX() const { return m_wheelDelta.x(); } // Deprecated, negative when scrolling right.
76 int wheelDeltaY() const { return m_wheelDelta.y(); } // Deprecated, negative when scrolling down. 76 int wheelDeltaY() const { return m_wheelDelta.y(); } // Deprecated, negative when scrolling down.
77 unsigned deltaMode() const { return m_deltaMode; } 77 unsigned deltaMode() const { return m_deltaMode; }
78 float ticksX() const { return static_cast<float>(m_wheelDelta.x()) / TickMul tiplier; } 78 float ticksX() const { return static_cast<float>(m_wheelDelta.x()) / TickMul tiplier; }
79 float ticksY() const { return static_cast<float>(m_wheelDelta.y()) / TickMul tiplier; } 79 float ticksY() const { return static_cast<float>(m_wheelDelta.y()) / TickMul tiplier; }
80 bool canScroll() const { return m_canScroll; } 80 bool canScroll() const { return m_canScroll; }
81 int resendingPluginId() const { return m_resendingPluginId; } 81 int resendingPluginId() const { return m_resendingPluginId; }
82 bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; } 82 bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; }
83 RailsMode getRailsMode() const { return m_railsMode; } 83 RailsMode getRailsMode() const { return m_railsMode; }
84 84
85 const AtomicString& interfaceName() const override; 85 const AtomicString& interfaceName() const override;
86 bool isMouseEvent() const override; 86 bool isMouseEvent() const override;
87 bool isWheelEvent() const override; 87 bool isWheelEvent() const override;
88 88
89 PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator() override; 89 RawPtr<EventDispatchMediator> createMediator() override;
90 90
91 DECLARE_VIRTUAL_TRACE(); 91 DECLARE_VIRTUAL_TRACE();
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& windowLocation, 97 unsigned, RawPtr<AbstractView>, const IntPoint& screenLocation, const In tPoint& windowLocation,
98 PlatformEvent::Modifiers, unsigned short buttons, double platformTimeSta mp, 98 PlatformEvent::Modifiers, unsigned short buttons, double platformTimeSta mp,
99 bool canScroll, int resendingPluginId, bool hasPreciseScrollingDeltas, R ailsMode); 99 bool canScroll, int resendingPluginId, bool hasPreciseScrollingDeltas, R ailsMode);
100 100
101 IntPoint m_wheelDelta; 101 IntPoint m_wheelDelta;
102 double m_deltaX; 102 double m_deltaX;
103 double m_deltaY; 103 double m_deltaY;
104 double m_deltaZ; 104 double m_deltaZ;
105 unsigned m_deltaMode; 105 unsigned m_deltaMode;
106 bool m_canScroll; 106 bool m_canScroll;
107 int m_resendingPluginId; 107 int m_resendingPluginId;
108 bool m_hasPreciseScrollingDeltas; 108 bool m_hasPreciseScrollingDeltas;
109 RailsMode m_railsMode; 109 RailsMode m_railsMode;
110 }; 110 };
111 111
112 DEFINE_EVENT_TYPE_CASTS(WheelEvent); 112 DEFINE_EVENT_TYPE_CASTS(WheelEvent);
113 113
114 } // namespace blink 114 } // namespace blink
115 115
116 #endif // WheelEvent_h 116 #endif // WheelEvent_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/UIEventWithKeyState.cpp ('k') | third_party/WebKit/Source/core/events/WheelEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698