Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: third_party/WebKit/Source/modules/device_orientation/DeviceMotionEvent.cpp

Issue 2767473004: Update DeviceMotionEvent IDL to match the specification. (Closed)
Patch Set: Rebased. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 if (!m_deviceMotionData->getRotationRate()) 73 if (!m_deviceMotionData->getRotationRate())
74 return nullptr; 74 return nullptr;
75 75
76 if (!m_rotationRate) 76 if (!m_rotationRate)
77 m_rotationRate = 77 m_rotationRate =
78 DeviceRotationRate::create(m_deviceMotionData->getRotationRate()); 78 DeviceRotationRate::create(m_deviceMotionData->getRotationRate());
79 79
80 return m_rotationRate.get(); 80 return m_rotationRate.get();
81 } 81 }
82 82
83 double DeviceMotionEvent::interval(bool& isNull) const { 83 double DeviceMotionEvent::interval() const {
84 isNull = false;
85 return m_deviceMotionData->interval(); 84 return m_deviceMotionData->interval();
86 } 85 }
87 86
88 const AtomicString& DeviceMotionEvent::interfaceName() const { 87 const AtomicString& DeviceMotionEvent::interfaceName() const {
89 return EventNames::DeviceMotionEvent; 88 return EventNames::DeviceMotionEvent;
90 } 89 }
91 90
92 DEFINE_TRACE(DeviceMotionEvent) { 91 DEFINE_TRACE(DeviceMotionEvent) {
93 visitor->trace(m_deviceMotionData); 92 visitor->trace(m_deviceMotionData);
94 visitor->trace(m_acceleration); 93 visitor->trace(m_acceleration);
95 visitor->trace(m_accelerationIncludingGravity); 94 visitor->trace(m_accelerationIncludingGravity);
96 visitor->trace(m_rotationRate); 95 visitor->trace(m_rotationRate);
97 Event::trace(visitor); 96 Event::trace(visitor);
98 } 97 }
99 98
100 } // namespace blink 99 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698