OLD | NEW |
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 if (!vr_device_ || !delegate_provider) | 112 if (!vr_device_ || !delegate_provider) |
113 return; | 113 return; |
114 | 114 |
115 vr_device_->SetDelegate(delegate_provider->GetNonPresentingDelegate()); | 115 vr_device_->SetDelegate(delegate_provider->GetNonPresentingDelegate()); |
116 | 116 |
117 // Remove GVR gamepad polling. | 117 // Remove GVR gamepad polling. |
118 GamepadDataFetcherManager::GetInstance()->RemoveSourceFactory( | 118 GamepadDataFetcherManager::GetInstance()->RemoveSourceFactory( |
119 GAMEPAD_SOURCE_GVR); | 119 GAMEPAD_SOURCE_GVR); |
120 } | 120 } |
121 | 121 |
| 122 void GvrDeviceProvider::SetListeningForActivate(bool listening) { |
| 123 device::GvrDelegateProvider* delegate_provider = |
| 124 device::GvrDelegateProvider::GetInstance(); |
| 125 if (!delegate_provider) |
| 126 return; |
| 127 |
| 128 delegate_provider->SetListeningForActivate(listening); |
| 129 } |
| 130 |
122 } // namespace device | 131 } // namespace device |
OLD | NEW |