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 24 matching lines...) Expand all Loading... |
35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
36 #include "public/platform/WebPlatformEventType.h" | 36 #include "public/platform/WebPlatformEventType.h" |
37 #include "public/platform/modules/device_orientation/WebDeviceOrientationListene
r.h" | 37 #include "public/platform/modules/device_orientation/WebDeviceOrientationListene
r.h" |
38 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class DeviceOrientationData; | 42 class DeviceOrientationData; |
43 class WebDeviceOrientationData; | 43 class WebDeviceOrientationData; |
44 | 44 |
45 // This class listens to device orientation data and notifies all registered con
trollers. | 45 // This class listens to device orientation data and notifies all registered |
| 46 // controllers. |
46 class DeviceOrientationDispatcher final | 47 class DeviceOrientationDispatcher final |
47 : public GarbageCollectedFinalized<DeviceOrientationDispatcher>, | 48 : public GarbageCollectedFinalized<DeviceOrientationDispatcher>, |
48 public PlatformEventDispatcher, | 49 public PlatformEventDispatcher, |
49 public WebDeviceOrientationListener { | 50 public WebDeviceOrientationListener { |
50 USING_GARBAGE_COLLECTED_MIXIN(DeviceOrientationDispatcher); | 51 USING_GARBAGE_COLLECTED_MIXIN(DeviceOrientationDispatcher); |
51 | 52 |
52 public: | 53 public: |
53 static DeviceOrientationDispatcher& instance(bool absolute); | 54 static DeviceOrientationDispatcher& instance(bool absolute); |
54 ~DeviceOrientationDispatcher() override; | 55 ~DeviceOrientationDispatcher() override; |
55 | 56 |
(...skipping 15 matching lines...) Expand all Loading... |
71 | 72 |
72 WebPlatformEventType getWebPlatformEventType() const; | 73 WebPlatformEventType getWebPlatformEventType() const; |
73 | 74 |
74 const bool m_absolute; | 75 const bool m_absolute; |
75 Member<DeviceOrientationData> m_lastDeviceOrientationData; | 76 Member<DeviceOrientationData> m_lastDeviceOrientationData; |
76 }; | 77 }; |
77 | 78 |
78 } // namespace blink | 79 } // namespace blink |
79 | 80 |
80 #endif // DeviceOrientationDispatcher_h | 81 #endif // DeviceOrientationDispatcher_h |
OLD | NEW |