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

Unified Diff: device/vr/vr_device_manager.h

Issue 2266793002: Add SchedulePollEvents and PollEvents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add StopSchedulingPollEvents Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | device/vr/vr_device_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_device_manager.h
diff --git a/device/vr/vr_device_manager.h b/device/vr/vr_device_manager.h
index 98bc66c80af88e1291fbd62d85ace7f750b25748..15e6bc4ae25e6b1fc14fadc94607fe0e35b6735c 100644
--- a/device/vr/vr_device_manager.h
+++ b/device/vr/vr_device_manager.h
@@ -14,6 +14,7 @@
#include "base/macros.h"
#include "base/memory/linked_ptr.h"
#include "base/threading/thread_checker.h"
+#include "base/timer/timer.h"
#include "device/vr/vr_client_dispatcher.h"
#include "device/vr/vr_device.h"
#include "device/vr/vr_device_provider.h"
@@ -56,6 +57,10 @@ class VRDeviceManager : public VRClientDispatcher {
void InitializeProviders();
void RegisterProvider(std::unique_ptr<VRDeviceProvider> provider);
+ void SchedulePollEvents();
+ void PollEvents();
+ void StopSchedulingPollEvents();
+
using ProviderList = std::vector<linked_ptr<VRDeviceProvider>>;
ProviderList providers_;
@@ -71,8 +76,12 @@ class VRDeviceManager : public VRClientDispatcher {
// For testing. If true will not delete self when consumer count reaches 0.
bool keep_alive_;
+ bool has_scheduled_poll_;
+
base::ThreadChecker thread_checker_;
+ base::RepeatingTimer timer_;
+
DISALLOW_COPY_AND_ASSIGN(VRDeviceManager);
};
« no previous file with comments | « AUTHORS ('k') | device/vr/vr_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698