Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 EventTarget* relatedTarget() const { return m_relatedTarget.get(); } | 71 EventTarget* relatedTarget() const { return m_relatedTarget.get(); } |
| 72 void setRelatedTarget(PassRefPtrWillBeRawPtr<EventTarget> relatedTarget) { m _relatedTarget = relatedTarget; } | 72 void setRelatedTarget(PassRefPtrWillBeRawPtr<EventTarget> relatedTarget) { m _relatedTarget = relatedTarget; } |
| 73 | 73 |
| 74 Node* toElement() const; | 74 Node* toElement() const; |
| 75 Node* fromElement() const; | 75 Node* fromElement() const; |
| 76 | 76 |
| 77 DataTransfer* dataTransfer() const { return isDragEvent() ? m_dataTransfer.g et() : 0; } | 77 DataTransfer* dataTransfer() const { return isDragEvent() ? m_dataTransfer.g et() : 0; } |
| 78 | 78 |
| 79 bool fromTouch() const { return m_syntheticEventType == PlatformMouseEvent:: FromTouch; } | 79 bool fromTouch() const { return m_syntheticEventType == PlatformMouseEvent:: FromTouch; } |
| 80 | 80 |
| 81 bool isSynthetic() const { return m_syntheticEventType == PlatformMouseEvent ::Synthetic; } | |
|
Rick Byers
2015/03/05 16:34:18
Again this name is confusing. IIRC we recently rep
| |
| 82 void markAsSynthetic() { m_syntheticEventType = PlatformMouseEvent::Syntheti c; } | |
| 83 | |
| 81 virtual const AtomicString& interfaceName() const override; | 84 virtual const AtomicString& interfaceName() const override; |
| 82 | 85 |
| 83 virtual bool isMouseEvent() const override; | 86 virtual bool isMouseEvent() const override; |
| 84 virtual bool isDragEvent() const override final; | 87 virtual bool isDragEvent() const override final; |
| 85 virtual int which() const override final; | 88 virtual int which() const override final; |
| 86 | 89 |
| 87 DECLARE_VIRTUAL_TRACE(); | 90 DECLARE_VIRTUAL_TRACE(); |
| 88 | 91 |
| 89 protected: | 92 protected: |
| 90 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe fPtrWillBeRawPtr<AbstractView>, | 93 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe fPtrWillBeRawPtr<AbstractView>, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 virtual bool dispatchEvent(EventDispatcher&) const override; | 133 virtual bool dispatchEvent(EventDispatcher&) const override; |
| 131 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou seEvent; } | 134 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou seEvent; } |
| 132 MouseEventType m_mouseEventType; | 135 MouseEventType m_mouseEventType; |
| 133 }; | 136 }; |
| 134 | 137 |
| 135 DEFINE_EVENT_TYPE_CASTS(MouseEvent); | 138 DEFINE_EVENT_TYPE_CASTS(MouseEvent); |
| 136 | 139 |
| 137 } // namespace blink | 140 } // namespace blink |
| 138 | 141 |
| 139 #endif // MouseEvent_h | 142 #endif // MouseEvent_h |
| OLD | NEW |