OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "modules/device_orientation/DeviceOrientationController.h" | 5 #include "modules/device_orientation/DeviceOrientationController.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "core/frame/Deprecation.h" | 8 #include "core/frame/Deprecation.h" |
9 #include "core/frame/HostsUsingFeatures.h" | 9 #include "core/frame/HostsUsingFeatures.h" |
10 #include "core/frame/Settings.h" | 10 #include "core/frame/Settings.h" |
11 #include "modules/EventModules.h" | 11 #include "modules/EventModules.h" |
12 #include "modules/device_orientation/DeviceOrientationData.h" | 12 #include "modules/device_orientation/DeviceOrientationData.h" |
13 #include "modules/device_orientation/DeviceOrientationDispatcher.h" | 13 #include "modules/device_orientation/DeviceOrientationDispatcher.h" |
14 #include "modules/device_orientation/DeviceOrientationEvent.h" | 14 #include "modules/device_orientation/DeviceOrientationEvent.h" |
15 #include "platform/weborigin/SecurityOrigin.h" | 15 #include "platform/weborigin/SecurityOrigin.h" |
16 #include "public/platform/Platform.h" | 16 #include "public/platform/Platform.h" |
17 #include "wtf/Assertions.h" | 17 #include "wtf/Assertions.h" |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 | 20 |
21 DeviceOrientationController::DeviceOrientationController(Document& document) | 21 DeviceOrientationController::DeviceOrientationController(Document& document) |
22 : DeviceSingleWindowEventController(document) {} | 22 : DeviceSingleWindowEventController(document), |
| 23 Supplement<Document>(document) {} |
23 | 24 |
24 DeviceOrientationController::~DeviceOrientationController() {} | 25 DeviceOrientationController::~DeviceOrientationController() {} |
25 | 26 |
26 void DeviceOrientationController::didUpdateData() { | 27 void DeviceOrientationController::didUpdateData() { |
27 if (m_overrideOrientationData) | 28 if (m_overrideOrientationData) |
28 return; | 29 return; |
29 dispatchDeviceEvent(lastEvent()); | 30 dispatchDeviceEvent(lastEvent()); |
30 } | 31 } |
31 | 32 |
32 const char* DeviceOrientationController::supplementName() { | 33 const char* DeviceOrientationController::supplementName() { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 return DeviceOrientationDispatcher::instance(false); | 128 return DeviceOrientationDispatcher::instance(false); |
128 } | 129 } |
129 | 130 |
130 DEFINE_TRACE(DeviceOrientationController) { | 131 DEFINE_TRACE(DeviceOrientationController) { |
131 visitor->trace(m_overrideOrientationData); | 132 visitor->trace(m_overrideOrientationData); |
132 DeviceSingleWindowEventController::trace(visitor); | 133 DeviceSingleWindowEventController::trace(visitor); |
133 Supplement<Document>::trace(visitor); | 134 Supplement<Document>::trace(visitor); |
134 } | 135 } |
135 | 136 |
136 } // namespace blink | 137 } // namespace blink |
OLD | NEW |