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 #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" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "device/vr/android/gvr/gvr_delegate.h" | 12 #include "device/vr/android/gvr/gvr_delegate.h" |
13 | 13 |
14 namespace device { | 14 namespace device { |
15 class GvrDeviceProvider; | 15 class GvrDeviceProvider; |
16 } | 16 } |
17 | 17 |
18 namespace vr_shell { | 18 namespace vr_shell { |
19 | 19 |
20 class VrShell; | |
21 | |
22 class VrShellDelegate : public device::GvrDelegateProvider { | 20 class VrShellDelegate : public device::GvrDelegateProvider { |
23 public: | 21 public: |
24 VrShellDelegate(JNIEnv* env, jobject obj); | 22 VrShellDelegate(JNIEnv* env, jobject obj); |
25 virtual ~VrShellDelegate(); | 23 virtual ~VrShellDelegate(); |
26 | 24 |
27 static VrShellDelegate* GetNativeDelegate(JNIEnv* env, jobject jdelegate); | 25 static VrShellDelegate* GetNativeDelegate(JNIEnv* env, jobject jdelegate); |
28 | 26 |
29 base::WeakPtr<device::GvrDeviceProvider> GetDeviceProvider(); | 27 base::WeakPtr<device::GvrDeviceProvider> GetDeviceProvider(); |
30 | 28 |
31 void SetPresentResult(JNIEnv* env, jobject obj, jboolean result); | 29 void SetPresentResult(JNIEnv* env, jobject obj, jboolean result); |
(...skipping 15 matching lines...) Expand all Loading... |
47 base::Callback<void(bool)> present_callback_; | 45 base::Callback<void(bool)> present_callback_; |
48 | 46 |
49 DISALLOW_COPY_AND_ASSIGN(VrShellDelegate); | 47 DISALLOW_COPY_AND_ASSIGN(VrShellDelegate); |
50 }; | 48 }; |
51 | 49 |
52 bool RegisterVrShellDelegate(JNIEnv* env); | 50 bool RegisterVrShellDelegate(JNIEnv* env); |
53 | 51 |
54 } // namespace vr_shell | 52 } // namespace vr_shell |
55 | 53 |
56 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_ | 54 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_ |
OLD | NEW |