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

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

Issue 2488273002: Revert of mojo VR interface simplified (Closed)
Patch Set: 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/android/gvr/gvr_device_provider.h ('k') | device/vr/test/fake_vr_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8a3637d25902a91e6e08143cae45ada582d26a32..252aa117667e09cce9ca7041c791706dc8c2a220 100644
--- a/device/vr/android/gvr/gvr_device_provider.cc
+++ b/device/vr/android/gvr/gvr_device_provider.cc
@@ -43,6 +43,11 @@
devices->push_back(vr_device_.get());
}
+void GvrDeviceProvider::SetClient(VRClientDispatcher* client) {
+ if (!client_)
+ client_.reset(client);
+}
+
void GvrDeviceProvider::Initialize() {
device::GvrDelegateProvider* delegate_provider =
device::GvrDelegateProvider::GetInstance();
@@ -52,6 +57,7 @@
if (!vr_device_) {
vr_device_.reset(
new GvrDevice(this, delegate_provider->GetNonPresentingDelegate()));
+ client_->OnDeviceConnectionStatusChanged(vr_device_.get(), true);
}
}
@@ -82,6 +88,9 @@
GAMEPAD_SOURCE_GVR);
delegate_provider->ExitWebVRPresent();
+
+ if (client_)
+ client_->OnPresentEnded(vr_device_.get());
}
void GvrDeviceProvider::OnGvrDelegateReady(GvrDelegate* delegate) {
« no previous file with comments | « device/vr/android/gvr/gvr_device_provider.h ('k') | device/vr/test/fake_vr_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698