Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef DeviceOrientationDispatcher_h | 31 #ifndef DeviceOrientationDispatcher_h |
| 32 #define DeviceOrientationDispatcher_h | 32 #define DeviceOrientationDispatcher_h |
| 33 | 33 |
| 34 #include "core/frame/PlatformEventDispatcher.h" | 34 #include "core/frame/PlatformEventDispatcher.h" |
| 35 #include "platform/heap/Handle.h" | |
|
Mike West
2014/10/11 10:53:05
Member<>.
| |
| 36 #include "public/platform/WebDeviceOrientationListener.h" | 35 #include "public/platform/WebDeviceOrientationListener.h" |
| 37 #include "wtf/RefPtr.h" | |
| 38 | 36 |
| 39 namespace blink { | 37 namespace blink { |
| 40 | 38 |
| 41 class DeviceOrientationController; | |
| 42 class DeviceOrientationData; | 39 class DeviceOrientationData; |
| 43 class WebDeviceOrientationData; | 40 class WebDeviceOrientationData; |
| 44 | 41 |
| 45 // This class listens to device orientation data and notifies all registered con trollers. | 42 // This class listens to device orientation data and notifies all registered con trollers. |
| 46 class DeviceOrientationDispatcher final : public GarbageCollectedFinalized<Devic eOrientationDispatcher>, public PlatformEventDispatcher, public WebDeviceOrienta tionListener { | 43 class DeviceOrientationDispatcher final : public GarbageCollectedFinalized<Devic eOrientationDispatcher>, public PlatformEventDispatcher, public WebDeviceOrienta tionListener { |
| 47 USING_GARBAGE_COLLECTED_MIXIN(DeviceOrientationDispatcher); | 44 USING_GARBAGE_COLLECTED_MIXIN(DeviceOrientationDispatcher); |
| 48 public: | 45 public: |
| 49 static DeviceOrientationDispatcher& instance(); | 46 static DeviceOrientationDispatcher& instance(); |
| 50 virtual ~DeviceOrientationDispatcher(); | 47 virtual ~DeviceOrientationDispatcher(); |
| 51 | 48 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 64 // Inherited from PlatformEventDispatcher. | 61 // Inherited from PlatformEventDispatcher. |
| 65 virtual void startListening() override; | 62 virtual void startListening() override; |
| 66 virtual void stopListening() override; | 63 virtual void stopListening() override; |
| 67 | 64 |
| 68 Member<DeviceOrientationData> m_lastDeviceOrientationData; | 65 Member<DeviceOrientationData> m_lastDeviceOrientationData; |
| 69 }; | 66 }; |
| 70 | 67 |
| 71 } // namespace blink | 68 } // namespace blink |
| 72 | 69 |
| 73 #endif // DeviceOrientationDispatcher_h | 70 #endif // DeviceOrientationDispatcher_h |
| OLD | NEW |