| 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/DeviceMotionController.h" | 5 #include "modules/device_orientation/DeviceMotionController.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/OriginsUsingFeatures.h" | 9 #include "core/frame/OriginsUsingFeatures.h" |
| 10 #include "core/frame/Settings.h" | 10 #include "core/frame/Settings.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 83 } |
| 84 | 84 |
| 85 PassRefPtrWillBeRawPtr<Event> DeviceMotionController::lastEvent() const | 85 PassRefPtrWillBeRawPtr<Event> DeviceMotionController::lastEvent() const |
| 86 { | 86 { |
| 87 return DeviceMotionEvent::create(EventTypeNames::devicemotion, DeviceMotionD
ispatcher::instance().latestDeviceMotionData()); | 87 return DeviceMotionEvent::create(EventTypeNames::devicemotion, DeviceMotionD
ispatcher::instance().latestDeviceMotionData()); |
| 88 } | 88 } |
| 89 | 89 |
| 90 bool DeviceMotionController::isNullEvent(Event* event) const | 90 bool DeviceMotionController::isNullEvent(Event* event) const |
| 91 { | 91 { |
| 92 DeviceMotionEvent* motionEvent = toDeviceMotionEvent(event); | 92 DeviceMotionEvent* motionEvent = toDeviceMotionEvent(event); |
| 93 return !motionEvent->deviceMotionData()->canProvideEventData(); | 93 return !motionEvent->getDeviceMotionData()->canProvideEventData(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 const AtomicString& DeviceMotionController::eventTypeName() const | 96 const AtomicString& DeviceMotionController::eventTypeName() const |
| 97 { | 97 { |
| 98 return EventTypeNames::devicemotion; | 98 return EventTypeNames::devicemotion; |
| 99 } | 99 } |
| 100 | 100 |
| 101 DEFINE_TRACE(DeviceMotionController) | 101 DEFINE_TRACE(DeviceMotionController) |
| 102 { | 102 { |
| 103 DeviceSingleWindowEventController::trace(visitor); | 103 DeviceSingleWindowEventController::trace(visitor); |
| 104 WillBeHeapSupplement<Document>::trace(visitor); | 104 WillBeHeapSupplement<Document>::trace(visitor); |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace blink | 107 } // namespace blink |
| OLD | NEW |