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

Side by Side Diff: third_party/WebKit/Source/modules/vr/VREyeParameters.h

Issue 1918143007: Updated Blink WebVR interfaces to WebVR v1 spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webvr_mojo
Patch Set: Fixed layout test Created 4 years, 7 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef VREyeParameters_h 5 #ifndef VREyeParameters_h
6 #define VREyeParameters_h 6 #define VREyeParameters_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/dom/DOMPoint.h" 9 #include "core/dom/DOMTypedArray.h"
10 #include "core/dom/DOMRect.h"
11 #include "modules/vr/VRFieldOfView.h" 10 #include "modules/vr/VRFieldOfView.h"
12 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
13 #include "public/platform/modules/vr/WebVR.h" 12
14 #include "wtf/Forward.h" 13 #include "wtf/Forward.h"
15 14
16 namespace blink { 15 namespace blink {
17 16
18 class VREyeParameters final : public GarbageCollected<VREyeParameters>, public S criptWrappable { 17 struct WebVREyeParameters;
18
19 class VREyeParameters final : public GarbageCollectedFinalized<VREyeParameters>, public ScriptWrappable {
19 DEFINE_WRAPPERTYPEINFO(); 20 DEFINE_WRAPPERTYPEINFO();
20 public: 21 public:
21 static VREyeParameters* create() 22 VREyeParameters();
22 {
23 return new VREyeParameters();
24 }
25 23
26 VRFieldOfView* minimumFieldOfView() const { return m_minimumFieldOfView; } 24 DOMFloat32Array* offset() const { return m_offset; }
27 VRFieldOfView* maximumFieldOfView() const { return m_maximumFieldOfView; } 25 VRFieldOfView* fieldOfView() const { return m_fieldOfView; }
28 VRFieldOfView* recommendedFieldOfView() const { return m_recommendedFieldOfV iew; } 26 unsigned long renderWidth() const { return m_renderWidth; }
29 DOMPoint* eyeTranslation() const { return m_eyeTranslation; } 27 unsigned long renderHeight() const { return m_renderHeight; }
30 VRFieldOfView* currentFieldOfView() const { return m_currentFieldOfView; }
31 DOMRect* renderRect() const { return m_renderRect; }
32 28
33 void setFromWebVREyeParameters(const WebVREyeParameters&); 29 void update(const WebVREyeParameters&);
34 30
35 DECLARE_VIRTUAL_TRACE() 31 DECLARE_VIRTUAL_TRACE()
36 32
37 private: 33 private:
38 VREyeParameters(); 34 Member<DOMFloat32Array> m_offset;
39 35 Member<VRFieldOfView> m_fieldOfView;
40 Member<VRFieldOfView> m_minimumFieldOfView; 36 unsigned long m_renderWidth;
41 Member<VRFieldOfView> m_maximumFieldOfView; 37 unsigned long m_renderHeight;
42 Member<VRFieldOfView> m_recommendedFieldOfView;
43 Member<DOMPoint> m_eyeTranslation;
44
45 Member<VRFieldOfView> m_currentFieldOfView;
46 Member<DOMRect> m_renderRect;
47 }; 38 };
48 39
49 } // namespace blink 40 } // namespace blink
50 41
51 #endif // VREyeParameters_h 42 #endif // VREyeParameters_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRDisplayCollection.cpp ('k') | third_party/WebKit/Source/modules/vr/VREyeParameters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698