| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |