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

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

Issue 2668003003: Provide WebVR pose data only to the focused frame. (Closed)
Patch Set: Address comment Created 3 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
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 VRController_h 5 #ifndef VRController_h
6 #define VRController_h 6 #define VRController_h
7 7
8 #include "core/dom/ContextLifecycleObserver.h" 8 #include "core/dom/ContextLifecycleObserver.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "device/vr/vr_service.mojom-blink.h" 10 #include "device/vr/vr_service.mojom-blink.h"
(...skipping 20 matching lines...) Expand all
31 VRController(NavigatorVR*); 31 VRController(NavigatorVR*);
32 virtual ~VRController(); 32 virtual ~VRController();
33 33
34 void getDisplays(ScriptPromiseResolver*); 34 void getDisplays(ScriptPromiseResolver*);
35 void setListeningForActivate(bool); 35 void setListeningForActivate(bool);
36 36
37 void OnDisplayConnected(device::mojom::blink::VRDisplayPtr, 37 void OnDisplayConnected(device::mojom::blink::VRDisplayPtr,
38 device::mojom::blink::VRDisplayClientRequest, 38 device::mojom::blink::VRDisplayClientRequest,
39 device::mojom::blink::VRDisplayInfoPtr) override; 39 device::mojom::blink::VRDisplayInfoPtr) override;
40 40
41 void focusChanged(bool focused);
haraken 2017/02/03 18:46:18 Blink prefers using an enum over boolean for funct
mthiesse 2017/02/03 20:47:29 Got rid of the parameter rather than adding an enu
42
41 DECLARE_VIRTUAL_TRACE(); 43 DECLARE_VIRTUAL_TRACE();
42 44
43 private: 45 private:
44 void onDisplaysSynced(unsigned); 46 void onDisplaysSynced(unsigned);
45 void onGetDisplays(); 47 void onGetDisplays();
46 48
47 // ContextLifecycleObserver. 49 // ContextLifecycleObserver.
48 void contextDestroyed(ExecutionContext*) override; 50 void contextDestroyed(ExecutionContext*) override;
49 void dispose(); 51 void dispose();
50 52
51 Member<NavigatorVR> m_navigatorVR; 53 Member<NavigatorVR> m_navigatorVR;
52 VRDisplayVector m_displays; 54 VRDisplayVector m_displays;
53 55
54 bool m_displaySynced; 56 bool m_displaySynced;
55 unsigned m_numberOfSyncedDisplays; 57 unsigned m_numberOfSyncedDisplays;
56 58
57 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks; 59 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks;
58 device::mojom::blink::VRServicePtr m_service; 60 device::mojom::blink::VRServicePtr m_service;
59 mojo::Binding<device::mojom::blink::VRServiceClient> m_binding; 61 mojo::Binding<device::mojom::blink::VRServiceClient> m_binding;
60 }; 62 };
61 63
62 } // namespace blink 64 } // namespace blink
63 65
64 #endif // VRController_h 66 #endif // VRController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698