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

Unified Diff: third_party/WebKit/Source/modules/vr/VRController.h

Issue 2494733002: Reland of mojo VR interface simpified. (Closed)
Patch Set: Fix Werror Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/vr/vr_service_impl_unittest.cc ('k') | third_party/WebKit/Source/modules/vr/VRController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/vr/VRController.h
diff --git a/third_party/WebKit/Source/modules/vr/VRController.h b/third_party/WebKit/Source/modules/vr/VRController.h
index 9c8b5b85f09bbc8588cff718159b02d1ab312247..f7caf5fcf288c7ae92b63fba2028eab119a70c92 100644
--- a/third_party/WebKit/Source/modules/vr/VRController.h
+++ b/third_party/WebKit/Source/modules/vr/VRController.h
@@ -21,54 +21,41 @@ class NavigatorVR;
class VRGetDevicesCallback;
class VRController final : public GarbageCollectedFinalized<VRController>,
- public device::blink::VRServiceClient,
+ public device::mojom::blink::VRServiceClient,
public ContextLifecycleObserver {
USING_GARBAGE_COLLECTED_MIXIN(VRController);
WTF_MAKE_NONCOPYABLE(VRController);
+ USING_PRE_FINALIZER(VRController, dispose);
public:
VRController(NavigatorVR*);
virtual ~VRController();
- // VRService.
void getDisplays(ScriptPromiseResolver*);
- device::blink::VRPosePtr getPose(unsigned index);
- void resetPose(unsigned index);
- void requestPresent(ScriptPromiseResolver*,
- unsigned index,
- bool secureOrigin);
- void exitPresent(unsigned index);
- void submitFrame(unsigned index, device::blink::VRPosePtr);
- void updateLayerBounds(unsigned index,
- device::blink::VRLayerBoundsPtr leftBounds,
- device::blink::VRLayerBoundsPtr rightBounds);
-
- VRDisplay* createOrUpdateDisplay(const device::blink::VRDisplayPtr&);
- VRDisplayVector updateDisplays(mojo::WTFArray<device::blink::VRDisplayPtr>);
- VRDisplay* getDisplayForIndex(unsigned index);
+
+ void OnDisplayConnected(device::mojom::blink::VRDisplayPtr,
+ device::mojom::blink::VRDisplayClientRequest,
+ device::mojom::blink::VRDisplayInfoPtr) override;
DECLARE_VIRTUAL_TRACE();
private:
- // Binding callbacks.
- void onGetDisplays(mojo::WTFArray<device::blink::VRDisplayPtr>);
- void onPresentComplete(ScriptPromiseResolver*, unsigned index, bool success);
-
- // VRServiceClient.
- void OnDisplayChanged(device::blink::VRDisplayPtr) override;
- void OnExitPresent(unsigned index) override;
- void OnDisplayConnected(device::blink::VRDisplayPtr) override;
- void OnDisplayDisconnected(unsigned) override;
+ void onDisplaysSynced(unsigned);
+ void onGetDisplays();
// ContextLifecycleObserver.
void contextDestroyed() override;
+ void dispose();
Member<NavigatorVR> m_navigatorVR;
VRDisplayVector m_displays;
+ bool m_displaySynced;
+ unsigned m_numberOfSyncedDisplays;
+
Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks;
- device::blink::VRServicePtr m_service;
- mojo::Binding<device::blink::VRServiceClient> m_binding;
+ device::mojom::blink::VRServicePtr m_service;
+ mojo::Binding<device::mojom::blink::VRServiceClient> m_binding;
};
} // namespace blink
« no previous file with comments | « device/vr/vr_service_impl_unittest.cc ('k') | third_party/WebKit/Source/modules/vr/VRController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698