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

Unified Diff: Source/core/frame/DeviceSensorEventDispatcher.cpp

Issue 191003009: Move DeviceSensorEvent* h|cpp files to a common module (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix comments Created 6 years, 9 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
Index: Source/core/frame/DeviceSensorEventDispatcher.cpp
diff --git a/Source/modules/device_orientation/DeviceSensorEventDispatcher.cpp b/Source/core/frame/DeviceSensorEventDispatcher.cpp
similarity index 92%
rename from Source/modules/device_orientation/DeviceSensorEventDispatcher.cpp
rename to Source/core/frame/DeviceSensorEventDispatcher.cpp
index b5cd6ffaf0e3d161b4249679df4d94179d4d84a7..a992f0aa2e5246d1cce865668bee49ce393a8975 100644
--- a/Source/modules/device_orientation/DeviceSensorEventDispatcher.cpp
+++ b/Source/core/frame/DeviceSensorEventDispatcher.cpp
@@ -29,7 +29,7 @@
*/
#include "config.h"
-#include "modules/device_orientation/DeviceSensorEventDispatcher.h"
+#include "core/frame/DeviceSensorEventDispatcher.h"
namespace WebCore {
@@ -57,9 +57,10 @@ void DeviceSensorEventDispatcher::removeController(DeviceSensorEventController*
// Do not actually remove the controller from the vector, instead zero them out.
// The zeros are removed in these two cases:
// 1. either immediately if we are not dispatching any events,
- // 2. or after didChangeDeviceMotion/Orientation has dispatched all events.
+ // 2. or after events to all controllers have dispatched
+ // (see e.g. DeviceOrientationDispatcher::didChangeDeviceOrientation).
// This is to correctly handle the re-entrancy case when a controller is destroyed
- // while in the didChangeDeviceMotion/Orientation method.
+ // while the events are still being dispatched.
size_t index = m_controllers.find(controller);
if (index == kNotFound)
return;
« no previous file with comments | « Source/core/frame/DeviceSensorEventDispatcher.h ('k') | Source/modules/device_orientation/DeviceMotionController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698