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

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell_delegate.cc

Issue 2889693005: Stay in VR while showing DOFF flow and connect CCT exit button to this. (Closed)
Patch Set: rebase Created 3 years, 7 months 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 | « chrome/browser/android/vr_shell/vr_shell_delegate.h ('k') | no next file » | 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 "chrome/browser/android/vr_shell/vr_shell_delegate.h" 5 #include "chrome/browser/android/vr_shell/vr_shell_delegate.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 non_presenting_delegate_->Pause(); 135 non_presenting_delegate_->Pause();
136 } 136 }
137 } 137 }
138 138
139 void VrShellDelegate::OnResume(JNIEnv* env, const JavaParamRef<jobject>& obj) { 139 void VrShellDelegate::OnResume(JNIEnv* env, const JavaParamRef<jobject>& obj) {
140 if (non_presenting_delegate_) { 140 if (non_presenting_delegate_) {
141 non_presenting_delegate_->Resume(); 141 non_presenting_delegate_->Resume();
142 } 142 }
143 } 143 }
144 144
145 void VrShellDelegate::UpdateNonPresentingContext(
146 JNIEnv* env,
147 const JavaParamRef<jobject>& obj,
148 jlong context) {
149 gvr_context* ctx = reinterpret_cast<gvr_context*>(context);
150 non_presenting_delegate_->UpdateContext(ctx);
151 }
152
145 void VrShellDelegate::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) { 153 void VrShellDelegate::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) {
146 delete this; 154 delete this;
147 } 155 }
148 156
149 void VrShellDelegate::SetDeviceProvider( 157 void VrShellDelegate::SetDeviceProvider(
150 device::GvrDeviceProvider* device_provider) { 158 device::GvrDeviceProvider* device_provider) {
151 if (device_provider_ == device_provider) 159 if (device_provider_ == device_provider)
152 return; 160 return;
153 if (device_provider_) 161 if (device_provider_)
154 ClearDeviceProvider(); 162 ClearDeviceProvider();
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { 247 jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
240 return reinterpret_cast<intptr_t>(new VrShellDelegate(env, obj)); 248 return reinterpret_cast<intptr_t>(new VrShellDelegate(env, obj));
241 } 249 }
242 250
243 static void OnLibraryAvailable(JNIEnv* env, const JavaParamRef<jclass>& clazz) { 251 static void OnLibraryAvailable(JNIEnv* env, const JavaParamRef<jclass>& clazz) {
244 device::GvrDelegateProvider::SetInstance( 252 device::GvrDelegateProvider::SetInstance(
245 base::Bind(&VrShellDelegate::CreateVrShellDelegate)); 253 base::Bind(&VrShellDelegate::CreateVrShellDelegate));
246 } 254 }
247 255
248 } // namespace vr_shell 256 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698