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

Side by Side Diff: device/vr/android/gvr/gvr_device_provider.cc

Issue 2510993002: Notify VRDeviceProviders when there are pages listening for vrdisplayactivate (Closed)
Patch Set: Rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/vr/android/gvr/gvr_device_provider.h" 5 #include "device/vr/android/gvr/gvr_device_provider.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/context_utils.h" 9 #include "base/android/context_utils.h"
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 if (!vr_device_ || !delegate_provider) 110 if (!vr_device_ || !delegate_provider)
111 return; 111 return;
112 112
113 vr_device_->SetDelegate(delegate_provider->GetNonPresentingDelegate()); 113 vr_device_->SetDelegate(delegate_provider->GetNonPresentingDelegate());
114 114
115 // Remove GVR gamepad polling. 115 // Remove GVR gamepad polling.
116 GamepadDataFetcherManager::GetInstance()->RemoveSourceFactory( 116 GamepadDataFetcherManager::GetInstance()->RemoveSourceFactory(
117 GAMEPAD_SOURCE_GVR); 117 GAMEPAD_SOURCE_GVR);
118 } 118 }
119 119
120 void GvrDeviceProvider::SetListeningForActivate(bool listening) {
121 device::GvrDelegateProvider* delegate_provider =
122 device::GvrDelegateProvider::GetInstance();
123 if (!delegate_provider)
124 return;
125
126 delegate_provider->SetListeningForActivate(listening);
127 }
128
120 } // namespace device 129 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698