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

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

Issue 2494733002: Reland of mojo VR interface simpified. (Closed)
Patch Set: Fix Werror 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.cc ('k') | device/vr/android/gvr/gvr_device_provider.cc » ('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_DEVICE_PROVIDER_H 5 #ifndef DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H
6 #define DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H 6 #define DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/single_thread_task_runner.h" 11 #include "base/single_thread_task_runner.h"
12 #include "device/vr/vr_client_dispatcher.h"
13 #include "device/vr/vr_device.h" 12 #include "device/vr/vr_device.h"
14 #include "device/vr/vr_device_provider.h" 13 #include "device/vr/vr_device_provider.h"
15 #include "device/vr/vr_export.h" 14 #include "device/vr/vr_export.h"
16 15
17 namespace device { 16 namespace device {
18 17
19 class GvrDelegate; 18 class GvrDelegate;
20 class GvrDevice; 19 class GvrDevice;
20 class VRServiceImpl;
21 21
22 class DEVICE_VR_EXPORT GvrDeviceProvider : public VRDeviceProvider { 22 class DEVICE_VR_EXPORT GvrDeviceProvider : public VRDeviceProvider {
23 public: 23 public:
24 GvrDeviceProvider(); 24 GvrDeviceProvider();
25 ~GvrDeviceProvider() override; 25 ~GvrDeviceProvider() override;
26 26
27 void GetDevices(std::vector<VRDevice*>* devices) override; 27 void GetDevices(std::vector<VRDevice*>* devices) override;
28 void Initialize() override; 28 void Initialize() override;
29 29
30 // Called from GvrDevice 30 // Called from GvrDevice
31 bool RequestPresent(); 31 bool RequestPresent();
32 void ExitPresent(); 32 void ExitPresent();
33 33
34 // Called from GvrDelegate 34 // Called from GvrDelegate
35 void OnGvrDelegateReady(GvrDelegate* delegate); 35 void OnGvrDelegateReady(GvrDelegate* delegate);
36 void OnGvrDelegateRemoved(); 36 void OnGvrDelegateRemoved();
37 37
38 void SetClient(VRClientDispatcher* client) override;
39
40 private: 38 private:
41 void GvrDelegateReady(GvrDelegate* delegate); 39 void GvrDelegateReady(GvrDelegate* delegate);
42 void GvrDelegateRemoved(); 40 void GvrDelegateRemoved();
43 41
44 std::unique_ptr<VRClientDispatcher> client_;
45 std::unique_ptr<GvrDevice> vr_device_; 42 std::unique_ptr<GvrDevice> vr_device_;
46 43
47 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 44 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
48 45
49 DISALLOW_COPY_AND_ASSIGN(GvrDeviceProvider); 46 DISALLOW_COPY_AND_ASSIGN(GvrDeviceProvider);
50 }; 47 };
51 48
52 } // namespace device 49 } // namespace device
53 50
54 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H 51 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H
OLDNEW
« no previous file with comments | « device/vr/android/gvr/gvr_device.cc ('k') | device/vr/android/gvr/gvr_device_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698