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

Side by Side Diff: device/vr/android/gvr/gvr_delegate.h

Issue 2570553004: Clean up some VrShell threading issues and remove unnecessary WeakPtr types. (Closed)
Patch Set: rebase Created 4 years 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_gl.cc ('k') | device/vr/android/gvr/gvr_device.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 #ifndef DEVICE_VR_ANDROID_GVR_DELEGATE_H 5 #ifndef DEVICE_VR_ANDROID_GVR_DELEGATE_H
6 #define DEVICE_VR_ANDROID_GVR_DELEGATE_H 6 #define DEVICE_VR_ANDROID_GVR_DELEGATE_H
7 7
8 #include "base/memory/weak_ptr.h"
9 #include "device/vr/android/gvr/gvr_device_provider.h" 8 #include "device/vr/android/gvr/gvr_device_provider.h"
10 #include "device/vr/vr_export.h" 9 #include "device/vr/vr_export.h"
11 #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_ty pes.h" 10 #include "third_party/gvr-android-sdk/src/ndk/include/vr/gvr/capi/include/gvr_ty pes.h"
12 11
13 namespace gvr { 12 namespace gvr {
14 class GvrApi; 13 class GvrApi;
15 } // namespace gvr 14 } // namespace gvr
16 15
17 namespace device { 16 namespace device {
18 17
(...skipping 11 matching lines...) Expand all
30 virtual gvr::Sizei GetWebVRCompositorSurfaceSize() = 0; 29 virtual gvr::Sizei GetWebVRCompositorSurfaceSize() = 0;
31 virtual void SetWebVRRenderSurfaceSize(int width, int height) = 0; 30 virtual void SetWebVRRenderSurfaceSize(int width, int height) = 0;
32 virtual gvr::GvrApi* gvr_api() = 0; 31 virtual gvr::GvrApi* gvr_api() = 0;
33 }; 32 };
34 33
35 class DEVICE_VR_EXPORT GvrDelegateProvider { 34 class DEVICE_VR_EXPORT GvrDelegateProvider {
36 public: 35 public:
37 static void SetInstance(GvrDelegateProvider* delegate_provider); 36 static void SetInstance(GvrDelegateProvider* delegate_provider);
38 static GvrDelegateProvider* GetInstance(); 37 static GvrDelegateProvider* GetInstance();
39 38
40 virtual void SetDeviceProvider( 39 virtual void SetDeviceProvider(GvrDeviceProvider* device_provider) = 0;
41 base::WeakPtr<GvrDeviceProvider> device_provider) = 0;
42 virtual void RequestWebVRPresent( 40 virtual void RequestWebVRPresent(
43 const base::Callback<void(bool)>& callback) = 0; 41 const base::Callback<void(bool)>& callback) = 0;
44 virtual void ExitWebVRPresent() = 0; 42 virtual void ExitWebVRPresent() = 0;
45 virtual base::WeakPtr<GvrDelegate> GetNonPresentingDelegate() = 0; 43 virtual GvrDelegate* GetNonPresentingDelegate() = 0;
46 virtual void DestroyNonPresentingDelegate() = 0; 44 virtual void DestroyNonPresentingDelegate() = 0;
47 virtual void SetListeningForActivate(bool listening) = 0; 45 virtual void SetListeningForActivate(bool listening) = 0;
48 46
49 private: 47 private:
50 static GvrDelegateProvider* delegate_provider_; 48 static GvrDelegateProvider* delegate_provider_;
51 }; 49 };
52 50
53 } // namespace device 51 } // namespace device
54 52
55 #endif // DEVICE_VR_ANDROID_GVR_DELEGATE_H 53 #endif // DEVICE_VR_ANDROID_GVR_DELEGATE_H
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | device/vr/android/gvr/gvr_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698