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

Side by Side Diff: device/vr/vr_device_provider.h

Issue 2471433002: Implement WebVR presentation pausing for VR Shell Menu Mode (Closed)
Patch Set: Address comments 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_VR_DEVICE_PROVIDER_H 5 #ifndef DEVICE_VR_VR_DEVICE_PROVIDER_H
6 #define DEVICE_VR_VR_DEVICE_PROVIDER_H 6 #define DEVICE_VR_VR_DEVICE_PROVIDER_H
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h"
11
10 namespace device { 12 namespace device {
11 13
12 class VRClientDispatcher; 14 class VRClientDispatcher;
13 class VRDevice; 15 class VRDevice;
14 16
15 class VRDeviceProvider { 17 class VRDeviceProvider : public base::RefCountedThreadSafe<VRDeviceProvider> {
16 public: 18 public:
17 VRDeviceProvider() {} 19 VRDeviceProvider() {}
18 virtual ~VRDeviceProvider() {}
19 20
20 virtual void GetDevices(std::vector<VRDevice*>* devices) = 0; 21 virtual void GetDevices(std::vector<VRDevice*>* devices) = 0;
21 22
22 // If the VR API requires initialization that should happen here. 23 // If the VR API requires initialization that should happen here.
23 virtual void Initialize() = 0; 24 virtual void Initialize() = 0;
24 25
25 virtual void PollEvents() {} 26 virtual void PollEvents() {}
26 27
27 virtual void SetClient(VRClientDispatcher* client) {} 28 virtual void SetClient(VRClientDispatcher* client) {}
29
30 protected:
31 friend class base::RefCountedThreadSafe<VRDeviceProvider>;
32 virtual ~VRDeviceProvider() {}
28 }; 33 };
29 34
30 } // namespace device 35 } // namespace device
31 36
32 #endif // DEVICE_VR_VR_DEVICE_PROVIDER_H 37 #endif // DEVICE_VR_VR_DEVICE_PROVIDER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698