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

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

Issue 2584343002: WIP: working copy-no-compositor path
Patch Set: StatTracker destructor, delete old magic numbers, mojo export Created 3 years, 11 months 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_MANAGER_H 5 #ifndef DEVICE_VR_VR_DEVICE_MANAGER_H
6 #define DEVICE_VR_VR_DEVICE_MANAGER_H 6 #define DEVICE_VR_VR_DEVICE_MANAGER_H
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 23 matching lines...) Expand all
34 // Adds a listener for device manager events. VRDeviceManager does not own 34 // Adds a listener for device manager events. VRDeviceManager does not own
35 // this object. 35 // this object.
36 void AddService(VRServiceImpl* service); 36 void AddService(VRServiceImpl* service);
37 void RemoveService(VRServiceImpl* service); 37 void RemoveService(VRServiceImpl* service);
38 38
39 DEVICE_VR_EXPORT bool GetVRDevices(VRServiceImpl* service); 39 DEVICE_VR_EXPORT bool GetVRDevices(VRServiceImpl* service);
40 DEVICE_VR_EXPORT unsigned int GetNumberOfConnectedDevices(); 40 DEVICE_VR_EXPORT unsigned int GetNumberOfConnectedDevices();
41 41
42 void ListeningForActivateChanged(bool listening); 42 void ListeningForActivateChanged(bool listening);
43 43
44 DEVICE_VR_EXPORT VRDevice* GetDevice(unsigned int index);
45
44 private: 46 private:
45 friend class VRDeviceManagerTest; 47 friend class VRDeviceManagerTest;
46 friend class VRDisplayImplTest; 48 friend class VRDisplayImplTest;
47 friend class VRServiceImplTest; 49 friend class VRServiceImplTest;
48 50
49 VRDeviceManager(); 51 VRDeviceManager();
50 // Constructor for testing. 52 // Constructor for testing.
51 DEVICE_VR_EXPORT explicit VRDeviceManager( 53 DEVICE_VR_EXPORT explicit VRDeviceManager(
52 std::unique_ptr<VRDeviceProvider> provider); 54 std::unique_ptr<VRDeviceProvider> provider);
53 55
54 DEVICE_VR_EXPORT VRDevice* GetDevice(unsigned int index);
55
56 static void SetInstance(VRDeviceManager* service); 56 static void SetInstance(VRDeviceManager* service);
57 static bool HasInstance(); 57 static bool HasInstance();
58 58
59 void InitializeProviders(); 59 void InitializeProviders();
60 void RegisterProvider(std::unique_ptr<VRDeviceProvider> provider); 60 void RegisterProvider(std::unique_ptr<VRDeviceProvider> provider);
61 61
62 void SchedulePollEvents(); 62 void SchedulePollEvents();
63 void PollEvents(); 63 void PollEvents();
64 void StopSchedulingPollEvents(); 64 void StopSchedulingPollEvents();
65 65
(...skipping 18 matching lines...) Expand all
84 base::ThreadChecker thread_checker_; 84 base::ThreadChecker thread_checker_;
85 85
86 base::RepeatingTimer timer_; 86 base::RepeatingTimer timer_;
87 87
88 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager); 88 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager);
89 }; 89 };
90 90
91 } // namespace content 91 } // namespace content
92 92
93 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H 93 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698