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

Unified Diff: Source/platform/PlatformMouseEvent.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: Revert Patch Set 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/web/PopupContainer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/PlatformMouseEvent.h
diff --git a/Source/platform/PlatformMouseEvent.h b/Source/platform/PlatformMouseEvent.h
index 4a4b8a95ee4539a6f39e03ce151b885fb093e07c..488bd0c211c910e5137fe452603608f3484de634 100644
--- a/Source/platform/PlatformMouseEvent.h
+++ b/Source/platform/PlatformMouseEvent.h
@@ -37,7 +37,9 @@ enum MouseButton { NoButton = -1, LeftButton, MiddleButton, RightButton };
class PlatformMouseEvent : public PlatformEvent {
public:
enum SyntheticEventType {
- NotFromTouch,
+ // Real mouse input events or synthetic events that behave just like real events
+ RealOrIndistinguishable,
+ // Mouse events derived from touch input
FromTouch,
};
@@ -45,7 +47,7 @@ public:
: PlatformEvent(PlatformEvent::MouseMoved)
, m_button(NoButton)
, m_clickCount(0)
- , m_synthesized(NotFromTouch)
+ , m_synthesized(RealOrIndistinguishable)
, m_modifierFlags(0)
{
}
@@ -56,7 +58,7 @@ public:
, m_globalPosition(globalPosition)
, m_button(button)
, m_clickCount(clickCount)
- , m_synthesized(NotFromTouch)
+ , m_synthesized(RealOrIndistinguishable)
, m_modifierFlags(0)
{
}
@@ -72,13 +74,13 @@ public:
{
}
- PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition, MouseButton button, PlatformEvent::Type type, int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, double timestamp)
+ PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition, MouseButton button, PlatformEvent::Type type, int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, SyntheticEventType synthesized, double timestamp)
: PlatformEvent(type, shiftKey, ctrlKey, altKey, metaKey, timestamp)
, m_position(position)
, m_globalPosition(globalPosition)
, m_button(button)
, m_clickCount(clickCount)
- , m_synthesized(NotFromTouch)
+ , m_synthesized(synthesized)
, m_modifierFlags(0)
{
}
@@ -91,6 +93,7 @@ public:
int clickCount() const { return m_clickCount; }
unsigned modifierFlags() const { return m_modifierFlags; }
bool fromTouch() const { return m_synthesized == FromTouch; }
+ SyntheticEventType syntheticEventType() const { return m_synthesized; }
protected:
IntPoint m_position;
« no previous file with comments | « Source/core/page/EventHandler.cpp ('k') | Source/web/PopupContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698