| 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 252aa117667e09cce9ca7041c791706dc8c2a220..a6e04108f114b756e8d8557b83acd67f6c1a94ef 100644
|
| --- a/device/vr/android/gvr/gvr_device_provider.cc
|
| +++ b/device/vr/android/gvr/gvr_device_provider.cc
|
| @@ -36,19 +36,15 @@ 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) {
|
| device::GvrDelegateProvider* delegate_provider =
|
| device::GvrDelegateProvider::GetInstance();
|
| if (!delegate_provider)
|
| @@ -57,7 +53,8 @@ void GvrDeviceProvider::Initialize() {
|
| if (!vr_device_) {
|
| vr_device_.reset(
|
| new GvrDevice(this, delegate_provider->GetNonPresentingDelegate()));
|
| - client_->OnDeviceConnectionStatusChanged(vr_device_.get(), true);
|
| + vr_device_->SetClient(clients);
|
| + vr_device_->OnDisplayConnected();
|
| }
|
| }
|
|
|
| @@ -88,9 +85,6 @@ void GvrDeviceProvider::ExitPresent() {
|
| GAMEPAD_SOURCE_GVR);
|
|
|
| delegate_provider->ExitWebVRPresent();
|
| -
|
| - if (client_)
|
| - client_->OnPresentEnded(vr_device_.get());
|
| }
|
|
|
| void GvrDeviceProvider::OnGvrDelegateReady(GvrDelegate* delegate) {
|
|
|