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

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

Issue 453493002: Improve detection of touch events when hiding media controls. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@autoHideControls
Patch Set: Cannot use isSimulated, so define derivesFromTouch Created 6 years, 4 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 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 public: 52 public:
53 static PassRefPtrWillBeRawPtr<MouseEvent> create() 53 static PassRefPtrWillBeRawPtr<MouseEvent> create()
54 { 54 {
55 return adoptRefWillBeNoop(new MouseEvent); 55 return adoptRefWillBeNoop(new MouseEvent);
56 } 56 }
57 57
58 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& type, b ool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView>, 58 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& type, b ool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView>,
59 int detail, int screenX, int screenY, int pageX, int pageY, 59 int detail, int screenX, int screenY, int pageX, int pageY,
60 int movementX, int movementY, 60 int movementX, int movementY,
61 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b utton, 61 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b utton,
62 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPt r<DataTransfer>, bool isSimulated = false); 62 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPt r<DataTransfer>, bool isSimulated = false, bool derivesFromTouch = false);
Rick Byers 2014/08/19 16:06:47 Rather than add but-yet-another bool, I think we s
63 63
64 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& eventTy pe, PassRefPtrWillBeRawPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtrWillBeRawPtr<Node> relatedTarget); 64 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& eventTy pe, PassRefPtrWillBeRawPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtrWillBeRawPtr<Node> relatedTarget, bool derivesFromTouch = false);
65 65
66 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& eventTy pe, const MouseEventInit&); 66 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& eventTy pe, const MouseEventInit&);
67 67
68 virtual ~MouseEvent(); 68 virtual ~MouseEvent();
69 69
70 void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelabl e, PassRefPtrWillBeRawPtr<AbstractView>, 70 void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelabl e, PassRefPtrWillBeRawPtr<AbstractView>,
71 int detail, int screenX, int screenY, int clientX, int clientY, 71 int detail, int screenX, int screenY, int clientX, int clientY,
72 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, 72 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
73 unsigned short button, PassRefPtrWillBeRawPtr<EventTarget> relatedTarget ); 73 unsigned short button, PassRefPtrWillBeRawPtr<EventTarget> relatedTarget );
74 74
(...skipping 15 matching lines...) Expand all
90 virtual bool isDragEvent() const OVERRIDE FINAL; 90 virtual bool isDragEvent() const OVERRIDE FINAL;
91 virtual int which() const OVERRIDE FINAL; 91 virtual int which() const OVERRIDE FINAL;
92 92
93 virtual void trace(Visitor*) OVERRIDE; 93 virtual void trace(Visitor*) OVERRIDE;
94 94
95 protected: 95 protected:
96 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe fPtrWillBeRawPtr<AbstractView>, 96 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe fPtrWillBeRawPtr<AbstractView>,
97 int detail, int screenX, int screenY, int pageX, int pageY, 97 int detail, int screenX, int screenY, int pageX, int pageY,
98 int movementX, int movementY, 98 int movementX, int movementY,
99 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b utton, 99 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b utton,
100 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPt r<DataTransfer>, bool isSimulated); 100 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPt r<DataTransfer>, bool isSimulated, bool derivesFromTouch);
101 101
102 MouseEvent(const AtomicString& type, const MouseEventInit&); 102 MouseEvent(const AtomicString& type, const MouseEventInit&);
103 103
104 MouseEvent(); 104 MouseEvent();
105 105
106 private: 106 private:
107 unsigned short m_button; 107 unsigned short m_button;
108 bool m_buttonDown; 108 bool m_buttonDown;
109 RefPtrWillBeMember<EventTarget> m_relatedTarget; 109 RefPtrWillBeMember<EventTarget> m_relatedTarget;
110 RefPtrWillBeMember<DataTransfer> m_dataTransfer; 110 RefPtrWillBeMember<DataTransfer> m_dataTransfer;
(...skipping 22 matching lines...) Expand all
133 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; 133 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
134 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou seEvent; } 134 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou seEvent; }
135 MouseEventType m_mouseEventType; 135 MouseEventType m_mouseEventType;
136 }; 136 };
137 137
138 DEFINE_EVENT_TYPE_CASTS(MouseEvent); 138 DEFINE_EVENT_TYPE_CASTS(MouseEvent);
139 139
140 } // namespace blink 140 } // namespace blink
141 141
142 #endif // MouseEvent_h 142 #endif // MouseEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698