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

Unified Diff: device/vr/android/gvr/gvr_device_provider.cc

Issue 2317483002: Add support of vrdisplayconnect and vrdisplaydisconnect event (Closed)
Patch Set: Address most comments from bajones@ Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: device/vr/android/gvr/gvr_device_provider.cc
diff --git a/device/vr/android/gvr/gvr_device_provider.cc b/device/vr/android/gvr/gvr_device_provider.cc
index ad21151426db9f44117c538c14586b8f061e47e8..21e0790beeb9c063a85db16b7a8d2d7099d899e9 100644
--- a/device/vr/android/gvr/gvr_device_provider.cc
+++ b/device/vr/android/gvr/gvr_device_provider.cc
@@ -95,12 +95,20 @@ void GvrDeviceProvider::OnDelegateInitialized(GvrDelegate* delegate) {
if (!vr_device_)
vr_device_.reset(new GvrDevice(this, delegate));
- // Should fire a vrdisplayconnected event here.
+ if (vr_device_)
+ vr_device_->UpdateConnectionStatus(true);
}
void GvrDeviceProvider::OnDelegateShutdown() {
// Nothing to do here just yet. Eventually want to shut down the VRDevice and
// fire a vrdisplaydisconnected event.
+ if (vr_device_)
+ vr_device_->UpdateConnectionStatus(false);
+}
+
+void GvrDeviceProvider::PollEvents(VRClientDispatcher* client) {
+ if (vr_device_)
+ vr_device_->PollEvents(client);
}
} // namespace device

Powered by Google App Engine
This is Rietveld 408576698