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

Unified Diff: device/vr/vr_device_manager.cc

Issue 2471433002: Implement WebVR presentation pausing for VR Shell Menu Mode (Closed)
Patch Set: rebase 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
« no previous file with comments | « device/vr/vr_device_manager.h ('k') | device/vr/vr_device_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_device_manager.cc
diff --git a/device/vr/vr_device_manager.cc b/device/vr/vr_device_manager.cc
index 530feb82cb083761a9a53921e48409aa2976c5f7..a1d0144f0d93e356025cc69485026f9d8ee53d66 100644
--- a/device/vr/vr_device_manager.cc
+++ b/device/vr/vr_device_manager.cc
@@ -27,14 +27,12 @@ VRDeviceManager::VRDeviceManager()
has_scheduled_poll_(false) {
// Register VRDeviceProviders for the current platform
#if defined(OS_ANDROID)
- RegisterProvider(base::WrapUnique(new GvrDeviceProvider()));
+ RegisterProvider(base::MakeUnique<GvrDeviceProvider>());
#endif
}
VRDeviceManager::VRDeviceManager(std::unique_ptr<VRDeviceProvider> provider)
- : vr_initialized_(false),
- keep_alive_(true),
- has_scheduled_poll_(false) {
+ : vr_initialized_(false), keep_alive_(true), has_scheduled_poll_(false) {
thread_checker_.DetachFromThread();
RegisterProvider(std::move(provider));
SetInstance(this);
@@ -55,7 +53,7 @@ VRDeviceManager* VRDeviceManager::GetInstance() {
void VRDeviceManager::SetInstance(VRDeviceManager* instance) {
// Unit tests can create multiple instances but only one should exist at any
// given time so g_vr_device_manager should only go from nullptr to
- // non-nullptr and vica versa.
+ // non-nullptr and vice versa.
CHECK_NE(!!instance, !!g_vr_device_manager);
g_vr_device_manager = instance;
}
@@ -147,7 +145,7 @@ void VRDeviceManager::InitializeProviders() {
void VRDeviceManager::RegisterProvider(
std::unique_ptr<VRDeviceProvider> provider) {
- providers_.push_back(make_linked_ptr(provider.release()));
+ providers_.push_back(std::move(provider));
}
void VRDeviceManager::SchedulePollEvents() {
« no previous file with comments | « device/vr/vr_device_manager.h ('k') | device/vr/vr_device_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698