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

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

Issue 2317483002: Add support of vrdisplayconnect and vrdisplaydisconnect event (Closed)
Patch Set: Fix typo of Event reason 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 fd54be19b18fd25a5f2d2177b92c21e704801732..f3fca4998052440614d5bc8e9cc17f3b9c0c1d02 100644
--- a/device/vr/android/gvr/gvr_device_provider.cc
+++ b/device/vr/android/gvr/gvr_device_provider.cc
@@ -58,6 +58,12 @@ void GvrDeviceProvider::Initialize() {
}
}
+void GvrDeviceProvider::SetClient(VRClientDispatcher* client) {
+ if (!vr_device_)
+ return;
+ vr_device_->SetClient(client);
+}
+
void GvrDeviceProvider::OnGvrApiInitialized(gvr::GvrApi* gvr_api) {
if (!vr_device_)
vr_device_.reset(new GvrDevice(this, gvr_api));
@@ -69,4 +75,9 @@ void GvrDeviceProvider::OnGvrApiShutdown() {
// Nothing to do here just yet. Eventually want to shut down the VRDevice
}
+void GvrDeviceProvider::PollEvents() {
+ if (vr_device_)
+ vr_device_->PollEvents();
+}
+
} // namespace device

Powered by Google App Engine
This is Rietveld 408576698