| 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 1025ca40726bfe2136cc3ee93f18d62cc8b0d8fc..0679cbb57332232e35b2cd2b72d1fe58a3810bc6 100644
|
| --- a/device/vr/android/gvr/gvr_device_provider.cc
|
| +++ b/device/vr/android/gvr/gvr_device_provider.cc
|
| @@ -83,22 +83,19 @@ GvrDeviceProvider::~GvrDeviceProvider() {
|
| ExitPresent();
|
| }
|
|
|
| -void GvrDeviceProvider::GetDevices(std::vector<VRDevice*>* devices) {
|
| - Initialize();
|
| +void GvrDeviceProvider::GetDevices(std::vector<VRServiceImpl*>* clients,
|
| + std::vector<VRDevice*>* devices) {
|
| + Initialize(clients);
|
|
|
| if (vr_device_)
|
| devices->push_back(vr_device_.get());
|
| }
|
|
|
| -void GvrDeviceProvider::SetClient(VRClientDispatcher* client) {
|
| - if (!client_)
|
| - client_.reset(client);
|
| -}
|
| -
|
| -void GvrDeviceProvider::Initialize() {
|
| +void GvrDeviceProvider::Initialize(std::vector<VRServiceImpl*>* clients) {
|
| if (!vr_device_) {
|
| vr_device_.reset(new GvrDevice(this, nullptr));
|
| - client_->OnDeviceConnectionStatusChanged(vr_device_.get(), true);
|
| + vr_device_->SetClient(clients);
|
| + vr_device_->OnDisplayConnected();
|
| }
|
| }
|
|
|
| @@ -124,9 +121,6 @@ void GvrDeviceProvider::ExitPresent() {
|
| GvrDelegateProvider* delegate_provider = GvrDelegateProvider::GetInstance();
|
| if (delegate_provider)
|
| delegate_provider->ExitWebVRPresent();
|
| -
|
| - if (client_)
|
| - client_->OnPresentEnded(vr_device_.get());
|
| }
|
|
|
| void GvrDeviceProvider::OnGvrDelegateReady(GvrDelegate* delegate) {
|
|
|