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

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

Issue 26434002: Cleanup: Add more conversion helpers for usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to ToT. Patch for landing. Created 7 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
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 IntPoint m_wheelDelta; 107 IntPoint m_wheelDelta;
108 double m_deltaX; 108 double m_deltaX;
109 double m_deltaY; 109 double m_deltaY;
110 double m_deltaZ; 110 double m_deltaZ;
111 unsigned m_deltaMode; 111 unsigned m_deltaMode;
112 bool m_directionInvertedFromDevice; 112 bool m_directionInvertedFromDevice;
113 }; 113 };
114 114
115 inline WheelEvent* toWheelEvent(Event* event) 115 inline WheelEvent* toWheelEvent(Event* event)
116 { 116 {
117 ASSERT(event && event->isWheelEvent()); 117 ASSERT_WITH_SECURITY_IMPLICATION(!event || event->isWheelEvent());
118 return static_cast<WheelEvent*>(event); 118 return static_cast<WheelEvent*>(event);
119 } 119 }
120 120
121 class WheelEventDispatchMediator : public EventDispatchMediator { 121 class WheelEventDispatchMediator : public EventDispatchMediator {
122 public: 122 public:
123 static PassRefPtr<WheelEventDispatchMediator> create(const PlatformWheelEven t&, PassRefPtr<AbstractView>); 123 static PassRefPtr<WheelEventDispatchMediator> create(const PlatformWheelEven t&, PassRefPtr<AbstractView>);
124 private: 124 private:
125 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractVie w>); 125 WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractVie w>);
126 WheelEvent* event() const; 126 WheelEvent* event() const;
127 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; 127 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
128 }; 128 };
129 129
130 } // namespace WebCore 130 } // namespace WebCore
131 131
132 #endif // WheelEvent_h 132 #endif // WheelEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698