| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * * Redistributions of source code must retain the above copyright | 7 * * Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * * Redistributions in binary form must reproduce the above copyright | 9 * * Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 static PassRefPtr<GestureEvent> create(PassRefPtr<AbstractView>, const Platf
ormGestureEvent&); | 39 static PassRefPtr<GestureEvent> create(PassRefPtr<AbstractView>, const Platf
ormGestureEvent&); |
| 40 | 40 |
| 41 virtual bool isGestureEvent() const OVERRIDE; | 41 virtual bool isGestureEvent() const OVERRIDE; |
| 42 | 42 |
| 43 virtual const AtomicString& interfaceName() const OVERRIDE; | 43 virtual const AtomicString& interfaceName() const OVERRIDE; |
| 44 | 44 |
| 45 float deltaX() const { return m_deltaX; } | 45 float deltaX() const { return m_deltaX; } |
| 46 float deltaY() const { return m_deltaY; } | 46 float deltaY() const { return m_deltaY; } |
| 47 | 47 |
| 48 virtual void trace(Visitor*) OVERRIDE; |
| 49 |
| 48 private: | 50 private: |
| 49 GestureEvent(); | 51 GestureEvent(); |
| 50 GestureEvent(const AtomicString& type, PassRefPtr<AbstractView>, int screenX
, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKe
y, bool metaKey, float deltaX, float deltaY); | 52 GestureEvent(const AtomicString& type, PassRefPtr<AbstractView>, int screenX
, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKe
y, bool metaKey, float deltaX, float deltaY); |
| 51 | 53 |
| 52 float m_deltaX; | 54 float m_deltaX; |
| 53 float m_deltaY; | 55 float m_deltaY; |
| 54 }; | 56 }; |
| 55 | 57 |
| 56 class GestureEventDispatchMediator FINAL : public EventDispatchMediator { | 58 class GestureEventDispatchMediator FINAL : public EventDispatchMediator { |
| 57 public: | 59 public: |
| 58 static PassRefPtr<GestureEventDispatchMediator> create(PassRefPtr<GestureEve
nt> gestureEvent) | 60 static PassRefPtr<GestureEventDispatchMediator> create(PassRefPtr<GestureEve
nt> gestureEvent) |
| 59 { | 61 { |
| 60 return adoptRef(new GestureEventDispatchMediator(gestureEvent)); | 62 return adoptRef(new GestureEventDispatchMediator(gestureEvent)); |
| 61 } | 63 } |
| 62 | 64 |
| 63 private: | 65 private: |
| 64 explicit GestureEventDispatchMediator(PassRefPtr<GestureEvent>); | 66 explicit GestureEventDispatchMediator(PassRefPtr<GestureEvent>); |
| 65 | 67 |
| 66 GestureEvent* event() const; | 68 GestureEvent* event() const; |
| 67 | 69 |
| 68 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; | 70 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 DEFINE_EVENT_TYPE_CASTS(GestureEvent); | 73 DEFINE_EVENT_TYPE_CASTS(GestureEvent); |
| 72 | 74 |
| 73 } // namespace WebCore | 75 } // namespace WebCore |
| 74 | 76 |
| 75 #endif // GestureEvent_h | 77 #endif // GestureEvent_h |
| OLD | NEW |