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

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: Propagate SyntheticEventType to MouseRelatedEvent 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>,
63 bool isSimulated = false, PlatformMouseEvent::SyntheticEventType = Platf ormMouseEvent::NotFromTouch);
Rick Byers 2014/08/20 23:32:56 Re-using the PlatformMouseEvent::SyntheticEventTyp
Ignacio Solla 2014/08/21 17:30:14 Yes, I completely agree that isSimulated should be
63 64
64 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& eventTy pe, PassRefPtrWillBeRawPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtrWillBeRawPtr<Node> relatedTarget); 65 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& eventTy pe, PassRefPtrWillBeRawPtr<AbstractView>, const PlatformMouseEvent&, int detail, PassRefPtrWillBeRawPtr<Node> relatedTarget);
65 66
66 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& eventTy pe, const MouseEventInit&); 67 static PassRefPtrWillBeRawPtr<MouseEvent> create(const AtomicString& eventTy pe, const MouseEventInit&);
67 68
68 virtual ~MouseEvent(); 69 virtual ~MouseEvent();
69 70
70 void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelabl e, PassRefPtrWillBeRawPtr<AbstractView>, 71 void initMouseEvent(const AtomicString& type, bool canBubble, bool cancelabl e, PassRefPtrWillBeRawPtr<AbstractView>,
71 int detail, int screenX, int screenY, int clientX, int clientY, 72 int detail, int screenX, int screenY, int clientX, int clientY,
72 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, 73 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
(...skipping 17 matching lines...) Expand all
90 virtual bool isDragEvent() const OVERRIDE FINAL; 91 virtual bool isDragEvent() const OVERRIDE FINAL;
91 virtual int which() const OVERRIDE FINAL; 92 virtual int which() const OVERRIDE FINAL;
92 93
93 virtual void trace(Visitor*) OVERRIDE; 94 virtual void trace(Visitor*) OVERRIDE;
94 95
95 protected: 96 protected:
96 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe fPtrWillBeRawPtr<AbstractView>, 97 MouseEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRe fPtrWillBeRawPtr<AbstractView>,
97 int detail, int screenX, int screenY, int pageX, int pageY, 98 int detail, int screenX, int screenY, int pageX, int pageY,
98 int movementX, int movementY, 99 int movementX, int movementY,
99 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b utton, 100 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short b utton,
100 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPt r<DataTransfer>, bool isSimulated); 101 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, PassRefPtrWillBeRawPt r<DataTransfer>,
102 bool isSimulated, PlatformMouseEvent::SyntheticEventType);
101 103
102 MouseEvent(const AtomicString& type, const MouseEventInit&); 104 MouseEvent(const AtomicString& type, const MouseEventInit&);
103 105
104 MouseEvent(); 106 MouseEvent();
105 107
106 private: 108 private:
107 unsigned short m_button; 109 unsigned short m_button;
108 bool m_buttonDown; 110 bool m_buttonDown;
109 RefPtrWillBeMember<EventTarget> m_relatedTarget; 111 RefPtrWillBeMember<EventTarget> m_relatedTarget;
110 RefPtrWillBeMember<DataTransfer> m_dataTransfer; 112 RefPtrWillBeMember<DataTransfer> m_dataTransfer;
(...skipping 22 matching lines...) Expand all
133 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; 135 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
134 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou seEvent; } 136 bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMou seEvent; }
135 MouseEventType m_mouseEventType; 137 MouseEventType m_mouseEventType;
136 }; 138 };
137 139
138 DEFINE_EVENT_TYPE_CASTS(MouseEvent); 140 DEFINE_EVENT_TYPE_CASTS(MouseEvent);
139 141
140 } // namespace blink 142 } // namespace blink
141 143
142 #endif // MouseEvent_h 144 #endif // MouseEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698