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

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

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 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/jni_weak_ref.h" 10 #include "base/android/jni_weak_ref.h"
(...skipping 19 matching lines...) Expand all
30 30
31 void SetPresentResult(JNIEnv* env, jobject obj, jboolean result); 31 void SetPresentResult(JNIEnv* env, jobject obj, jboolean result);
32 32
33 // device::GvrDelegateProvider implementation 33 // device::GvrDelegateProvider implementation
34 void RequestWebVRPresent( 34 void RequestWebVRPresent(
35 base::WeakPtr<device::GvrDeviceProvider> device_provider, 35 base::WeakPtr<device::GvrDeviceProvider> device_provider,
36 const base::Callback<void(bool)>& callback) override; 36 const base::Callback<void(bool)>& callback) override;
37 void ExitWebVRPresent() override; 37 void ExitWebVRPresent() override;
38 base::WeakPtr<device::GvrDelegate> GetNonPresentingDelegate() override; 38 base::WeakPtr<device::GvrDelegate> GetNonPresentingDelegate() override;
39 void DestroyNonPresentingDelegate() override; 39 void DestroyNonPresentingDelegate() override;
40 void SetListeningForActivate(bool listening) override;
40 41
41 private: 42 private:
42 std::unique_ptr<device::GvrDelegate> non_presenting_delegate_; 43 std::unique_ptr<device::GvrDelegate> non_presenting_delegate_;
43 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_delegate_; 44 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_delegate_;
44 base::WeakPtr<device::GvrDeviceProvider> device_provider_; 45 base::WeakPtr<device::GvrDeviceProvider> device_provider_;
45 base::Callback<void(bool)> present_callback_; 46 base::Callback<void(bool)> present_callback_;
46 47
47 DISALLOW_COPY_AND_ASSIGN(VrShellDelegate); 48 DISALLOW_COPY_AND_ASSIGN(VrShellDelegate);
48 }; 49 };
49 50
50 bool RegisterVrShellDelegate(JNIEnv* env); 51 bool RegisterVrShellDelegate(JNIEnv* env);
51 52
52 } // namespace vr_shell 53 } // namespace vr_shell
53 54
54 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_ 55 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698