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

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
« no previous file with comments | « device/vr/android/gvr/gvr_device_provider.h ('k') | device/vr/vr_device_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « device/vr/android/gvr/gvr_device_provider.h ('k') | device/vr/vr_device_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698