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

Side by Side Diff: Source/modules/vr/VRPositionState.h

Issue 848053002: Adding WebVR interface to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed feedback from philipj@opera.com, rebased Created 5 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef VRPositionState_h
6 #define VRPositionState_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/dom/DOMPoint.h"
10 #include "platform/heap/Handle.h"
11 #include "public/platform/WebVR.h"
12 #include "wtf/RefCounted.h"
13 #include "wtf/text/WTFString.h"
14
15 namespace blink {
16
17 class VRPositionState final : public GarbageCollectedFinalized<VRPositionState>, public ScriptWrappable {
sof 2015/02/24 12:35:29 You can make this GarbageCollected<> and remove th
18 DEFINE_WRAPPERTYPEINFO();
19 public:
20 static VRPositionState* create()
21 {
22 return new VRPositionState();
23 }
24 ~VRPositionState();
25
26 double timeStamp() const { return m_timeStamp; }
27 DOMPoint* orientation() const { return m_orientation; }
28 DOMPoint* position() const { return m_position; }
29 DOMPoint* angularVelocity() const { return m_angularVelocity; }
30 DOMPoint* linearVelocity() const { return m_linearVelocity; }
31 DOMPoint* angularAcceleration() const { return m_angularAcceleration; }
32 DOMPoint* linearAcceleration() const { return m_linearAcceleration; }
33
34 void setState(const blink::WebHMDSensorState&);
35
36 virtual void trace(Visitor*);
37
38 private:
39 VRPositionState();
40
41 double m_timeStamp;
42 Member<DOMPoint> m_orientation;
43 Member<DOMPoint> m_position;
44 Member<DOMPoint> m_angularVelocity;
45 Member<DOMPoint> m_linearVelocity;
46 Member<DOMPoint> m_angularAcceleration;
47 Member<DOMPoint> m_linearAcceleration;
48 };
49
50 } // namespace blink
51
52 #endif // VRPositionState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698