| Index: Source/core/frame/DeviceEventDispatcherBase.h
|
| diff --git a/Source/core/frame/DeviceSensorEventDispatcher.h b/Source/core/frame/DeviceEventDispatcherBase.h
|
| similarity index 77%
|
| copy from Source/core/frame/DeviceSensorEventDispatcher.h
|
| copy to Source/core/frame/DeviceEventDispatcherBase.h
|
| index 26c269515f95d1bf6c5a51c0928273eebb6ff625..d8b1593cad67b2c0e601b8281c64f2bbc89c80d2 100644
|
| --- a/Source/core/frame/DeviceSensorEventDispatcher.h
|
| +++ b/Source/core/frame/DeviceEventDispatcherBase.h
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (C) 2013 Google Inc. All rights reserved.
|
| + * Copyright (C) 2014 Google Inc. All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions are
|
| @@ -28,31 +28,36 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef DeviceSensorEventDispatcher_h
|
| -#define DeviceSensorEventDispatcher_h
|
| +#ifndef DeviceEventDispatcherBase_h
|
| +#define DeviceEventDispatcherBase_h
|
|
|
| #include "wtf/Vector.h"
|
|
|
| namespace WebCore {
|
| -class DeviceSensorEventController;
|
| +class DeviceEventControllerBase;
|
| +
|
| +class DeviceEventDispatcherBase {
|
| +public:
|
| + void addController(DeviceEventControllerBase*);
|
| + void removeController(DeviceEventControllerBase*);
|
|
|
| -class DeviceSensorEventDispatcher {
|
| protected:
|
| - DeviceSensorEventDispatcher();
|
| - virtual ~DeviceSensorEventDispatcher();
|
| + DeviceEventDispatcherBase();
|
| + virtual ~DeviceEventDispatcherBase();
|
|
|
| - void addController(DeviceSensorEventController*);
|
| - void removeController(DeviceSensorEventController*);
|
| - void purgeControllers();
|
| + void notifyControllers();
|
|
|
| virtual void startListening() = 0;
|
| virtual void stopListening() = 0;
|
|
|
| - Vector<DeviceSensorEventController*> m_controllers;
|
| +private:
|
| + void purgeControllers();
|
| +
|
| + Vector<DeviceEventControllerBase*> m_controllers;
|
| bool m_needsPurge;
|
| bool m_isDispatching;
|
| };
|
|
|
| } // namespace WebCore
|
|
|
| -#endif // DeviceSensorEventDispatcher_h
|
| +#endif // DeviceEventDispatcherBase_h
|
|
|