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

Side by Side Diff: third_party/WebKit/Source/core/events/GestureEvent.cpp

Issue 1352523002: Use high precision timestamp for Event.timestamp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 2 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 GestureEvent::GestureEvent() 93 GestureEvent::GestureEvent()
94 : m_deltaX(0) 94 : m_deltaX(0)
95 , m_deltaY(0) 95 , m_deltaY(0)
96 , m_velocityX(0) 96 , m_velocityX(0)
97 , m_velocityY(0) 97 , m_velocityY(0)
98 , m_inertial(false) 98 , m_inertial(false)
99 , m_resendingPluginId(-1) 99 , m_resendingPluginId(-1)
100 { 100 {
101 } 101 }
102 102
103 GestureEvent::GestureEvent(const AtomicString& type, PassRefPtrWillBeRawPtr<Abst ractView> view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey , bool altKey, bool shiftKey, bool metaKey, float deltaX, float deltaY, float ve locityX, float velocityY, bool inertial, double uiTimestamp, int resendingPlugin Id) 103 GestureEvent::GestureEvent(const AtomicString& type, PassRefPtrWillBeRawPtr<Abst ractView> view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey , bool altKey, bool shiftKey, bool metaKey, float deltaX, float deltaY, float ve locityX, float velocityY, bool inertial, double timestamp, int resendingPluginId )
104 : MouseRelatedEvent(type, true, true, view, 0, IntPoint(screenX, screenY), I ntPoint(clientX, clientY), IntPoint(0, 0), ctrlKey, altKey, shiftKey, metaKey, P ositionType::Position) 104 : MouseRelatedEvent(type, true, true, view, 0, IntPoint(screenX, screenY), I ntPoint(clientX, clientY), IntPoint(0, 0), ctrlKey, altKey, shiftKey, metaKey, P ositionType::Position)
105 , m_deltaX(deltaX) 105 , m_deltaX(deltaX)
106 , m_deltaY(deltaY) 106 , m_deltaY(deltaY)
107 , m_velocityX(velocityX) 107 , m_velocityX(velocityX)
108 , m_velocityY(velocityY) 108 , m_velocityY(velocityY)
109 , m_inertial(inertial) 109 , m_inertial(inertial)
110 , m_resendingPluginId(resendingPluginId) 110 , m_resendingPluginId(resendingPluginId)
111 { 111 {
112 setUICreateTime(uiTimestamp); 112 setPlatformTimeStamp(timestamp);
113 } 113 }
114 114
115 PassRefPtrWillBeRawPtr<EventDispatchMediator> GestureEvent::createMediator() 115 PassRefPtrWillBeRawPtr<EventDispatchMediator> GestureEvent::createMediator()
116 { 116 {
117 return GestureEventDispatchMediator::create(this); 117 return GestureEventDispatchMediator::create(this);
118 } 118 }
119 119
120 DEFINE_TRACE(GestureEvent) 120 DEFINE_TRACE(GestureEvent)
121 { 121 {
122 MouseRelatedEvent::trace(visitor); 122 MouseRelatedEvent::trace(visitor);
(...skipping 10 matching lines...) Expand all
133 } 133 }
134 134
135 bool GestureEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) co nst 135 bool GestureEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) co nst
136 { 136 {
137 dispatcher.dispatch(); 137 dispatcher.dispatch();
138 ASSERT(!event().defaultPrevented()); 138 ASSERT(!event().defaultPrevented());
139 return event().defaultHandled() || event().defaultPrevented(); 139 return event().defaultHandled() || event().defaultPrevented();
140 } 140 }
141 141
142 } // namespace blink 142 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/Event.idl ('k') | third_party/WebKit/Source/core/events/KeyboardEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698