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

Unified Diff: device/vr/vr_device_manager.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 side-by-side diff with in-line comments
Download patch
Index: device/vr/vr_device_manager.h
diff --git a/device/vr/vr_device_manager.h b/device/vr/vr_device_manager.h
index 2a3bc206dcd916391a4cc8821b476dd8fe1ca1bc..da645a1d98039252cd58af44c93120dfeb5d45b3 100644
--- a/device/vr/vr_device_manager.h
+++ b/device/vr/vr_device_manager.h
@@ -12,7 +12,7 @@
#include <vector>
#include "base/macros.h"
-#include "base/memory/linked_ptr.h"
+#include "base/memory/ref_counted.h"
#include "base/threading/thread_checker.h"
#include "base/timer/timer.h"
#include "device/vr/vr_client_dispatcher.h"
@@ -55,6 +55,8 @@ class VRDeviceManager : public VRClientDispatcher {
void OnDeviceConnectionStatusChanged(VRDevice* device,
bool is_connected) override;
void OnPresentEnded(VRDevice* device) override;
+ void OnDisplayBlur(VRDevice* device) override;
+ void OnDisplayFocus(VRDevice* device) override;
private:
friend class VRDeviceManagerTest;
@@ -62,8 +64,7 @@ class VRDeviceManager : public VRClientDispatcher {
VRDeviceManager();
// Constructor for testing.
- DEVICE_VR_EXPORT explicit VRDeviceManager(
- std::unique_ptr<VRDeviceProvider> provider);
+ DEVICE_VR_EXPORT explicit VRDeviceManager(VRDeviceProvider* provider);
DEVICE_VR_EXPORT VRDevice* GetDevice(unsigned int index);
@@ -71,13 +72,13 @@ class VRDeviceManager : public VRClientDispatcher {
static bool HasInstance();
void InitializeProviders();
- void RegisterProvider(std::unique_ptr<VRDeviceProvider> provider);
+ void RegisterProvider(VRDeviceProvider* provider);
void SchedulePollEvents();
void PollEvents();
void StopSchedulingPollEvents();
- using ProviderList = std::vector<linked_ptr<VRDeviceProvider>>;
+ using ProviderList = std::vector<scoped_refptr<VRDeviceProvider>>;
ProviderList providers_;
// Devices are owned by their providers.

Powered by Google App Engine
This is Rietveld 408576698