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

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

Issue 2108923002: device: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: device Created 4 years, 5 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
« no previous file with comments | « device/vr/test/fake_vr_device_provider.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "device/vr/vr_device_manager.h" 5 #include "device/vr/vr_device_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 mojo::Array<VRDisplayPtr> VRDeviceManager::GetVRDevices() { 79 mojo::Array<VRDisplayPtr> VRDeviceManager::GetVRDevices() {
80 DCHECK(thread_checker_.CalledOnValidThread()); 80 DCHECK(thread_checker_.CalledOnValidThread());
81 81
82 InitializeProviders(); 82 InitializeProviders();
83 83
84 std::vector<VRDevice*> devices; 84 std::vector<VRDevice*> devices;
85 for (const auto& provider : providers_) 85 for (const auto& provider : providers_)
86 provider->GetDevices(&devices); 86 provider->GetDevices(&devices);
87 87
88 mojo::Array<VRDisplayPtr> out_devices; 88 mojo::Array<VRDisplayPtr> out_devices;
89 for (const auto& device : devices) { 89 for (auto* device : devices) {
90 if (device->id() == VR_DEVICE_LAST_ID) 90 if (device->id() == VR_DEVICE_LAST_ID)
91 continue; 91 continue;
92 92
93 if (devices_.find(device->id()) == devices_.end()) 93 if (devices_.find(device->id()) == devices_.end())
94 devices_[device->id()] = device; 94 devices_[device->id()] = device;
95 95
96 VRDisplayPtr vr_device_info = device->GetVRDevice(); 96 VRDisplayPtr vr_device_info = device->GetVRDevice();
97 if (vr_device_info.is_null()) 97 if (vr_device_info.is_null())
98 continue; 98 continue;
99 99
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 } 148 }
149 149
150 void VRDeviceManager::ResetPose(uint32_t index) { 150 void VRDeviceManager::ResetPose(uint32_t index) {
151 VRDevice* device = GetDevice(index); 151 VRDevice* device = GetDevice(index);
152 if (device) 152 if (device)
153 device->ResetPose(); 153 device->ResetPose();
154 } 154 }
155 155
156 } // namespace device 156 } // namespace device
OLDNEW
« no previous file with comments | « device/vr/test/fake_vr_device_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698