summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/core/events/MouseEvent.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/events/MouseEvent.h')
-rw-r--r--chromium/third_party/WebKit/Source/core/events/MouseEvent.h60
1 files changed, 28 insertions, 32 deletions
diff --git a/chromium/third_party/WebKit/Source/core/events/MouseEvent.h b/chromium/third_party/WebKit/Source/core/events/MouseEvent.h
index 41ab261eb8e..fc364c8e8c7 100644
--- a/chromium/third_party/WebKit/Source/core/events/MouseEvent.h
+++ b/chromium/third_party/WebKit/Source/core/events/MouseEvent.h
@@ -45,38 +45,32 @@ struct MouseEventInit : public UIEventInit {
bool shiftKey;
bool metaKey;
unsigned short button;
- RefPtr<EventTarget> relatedTarget;
+ RefPtrWillBeMember<EventTarget> relatedTarget;
};
class MouseEvent : public MouseRelatedEvent {
public:
- static PassRefPtr<MouseEvent> create()
+ static PassRefPtrWillBeRawPtr<MouseEvent> create()
{
- return adoptRef(new MouseEvent);
+ return adoptRefWillBeNoop(new MouseEvent);
}
- static PassRefPtr<MouseEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>,
+ static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView>,
int detail, int screenX, int screenY, int pageX, int pageY,
int movementX, int movementY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
- PassRefPtr<EventTarget> relatedTarget);
+ PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPtr<Clipboard>, bool isSimulated = false);
- static PassRefPtr<MouseEvent> create(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>,
- int detail, int screenX, int screenY, int pageX, int pageY,
- int movementX, int movementY,
- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
- PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard>, bool isSimulated = false);
-
- static PassRefPtr<MouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtr<Node> relatedTarget);
+ static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& eventType, PassRefPtrWillBeRawPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtrWillBeRawPtr<Node> relatedTarget);
- static PassRefPtr<MouseEvent> create(const AtomicString& eventType, const MouseEventInit&);
+ static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& eventType, const MouseEventInit&);
virtual ~MouseEvent();
- void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>,
+ void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView>,
int detail, int screenX, int screenY, int clientX, int clientY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
- unsigned short button, PassRefPtr<EventTarget> relatedTarget);
+ unsigned short button, PassRefPtrWillBeRawPtr<EventTarget> relatedTarget);
// WinIE uses 1,4,2 for left/middle/right but not for click (just for mousedown/up, maybe others),
// but we will match the standard DOM.
@@ -84,27 +78,27 @@ public:
bool buttonDown() const { return m_buttonDown; }
EventTarget* relatedTarget() const { return m_relatedTarget.get(); }
EventTarget* relatedTarget(bool& isNull) const { isNull = !m_relatedTarget; return m_relatedTarget.get(); }
- void setRelatedTarget(PassRefPtr<EventTarget> relatedTarget) { m_relatedTarget = relatedTarget; }
-
- Clipboard* clipboard() const { return m_clipboard.get(); }
+ void setRelatedTarget(PassRefPtrWillBeRawPtr<EventTarget> relatedTarget) { m_relatedTarget = relatedTarget; }
Node* toElement() const;
Node* fromElement() const;
Clipboard* dataTransfer() const { return isDragEvent() ? m_clipboard.get() : 0; }
- virtual const AtomicString& interfaceName() const;
+ virtual const AtomicString& interfaceName() const OVERRIDE;
+
+ virtual bool isMouseEvent() const OVERRIDE;
+ virtual bool isDragEvent() const OVERRIDE FINAL;
+ virtual int which() const OVERRIDE FINAL;
- virtual bool isMouseEvent() const;
- virtual bool isDragEvent() const;
- virtual int which() const;
+ virtual void trace(Visitor*) OVERRIDE;
protected:
- MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>,
+ MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView>,
int detail, int screenX, int screenY, int pageX, int pageY,
int movementX, int movementY,
bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
- PassRefPtr<EventTarget> relatedTarget, PassRefPtr<Clipboard>, bool isSimulated);
+ PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPtr<Clipboard>, bool isSimulated);
MouseEvent(const AtomicString& type, const MouseEventInit&);
@@ -113,26 +107,28 @@ protected:
private:
unsigned short m_button;
bool m_buttonDown;
- RefPtr<EventTarget> m_relatedTarget;
- RefPtr<Clipboard> m_clipboard;
+ RefPtrWillBeMember<EventTarget> m_relatedTarget;
+ RefPtrWillBeMember<Clipboard> m_clipboard;
};
-class SimulatedMouseEvent : public MouseEvent {
+class SimulatedMouseEvent FINAL : public MouseEvent {
public:
- static PassRefPtr<SimulatedMouseEvent> create(const AtomicString& eventType, PassRefPtr<AbstractView>, PassRefPtr<Event> underlyingEvent);
+ static PassRefPtrWillBeRawPtr<SimulatedMouseEvent> create(const AtomicString& eventType, PassRefPtrWillBeRawPtr<AbstractView>, PassRefPtrWillBeRawPtr<Event> underlyingEvent);
virtual ~SimulatedMouseEvent();
+ virtual void trace(Visitor*) OVERRIDE;
+
private:
- SimulatedMouseEvent(const AtomicString& eventType, PassRefPtr<AbstractView>, PassRefPtr<Event> underlyingEvent);
+ SimulatedMouseEvent(const AtomicString& eventType, PassRefPtrWillBeRawPtr<AbstractView>, PassRefPtrWillBeRawPtr<Event> underlyingEvent);
};
-class MouseEventDispatchMediator : public EventDispatchMediator {
+class MouseEventDispatchMediator FINAL : public EventDispatchMediator {
public:
enum MouseEventType { SyntheticMouseEvent, NonSyntheticMouseEvent};
- static PassRefPtr<MouseEventDispatchMediator> create(PassRefPtr<MouseEvent>, MouseEventType = NonSyntheticMouseEvent);
+ static PassRefPtrWillBeRawPtr<MouseEventDispatchMediator> create(PassRefPtrWillBeRawPtr<MouseEvent>, MouseEventType = NonSyntheticMouseEvent);
private:
- explicit MouseEventDispatchMediator(PassRefPtr<MouseEvent>, MouseEventType);
+ explicit MouseEventDispatchMediator(PassRefPtrWillBeRawPtr<MouseEvent>, MouseEventType);
MouseEvent* event() const;
virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;