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

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

Issue 2721553004: Remove auto raw pointer deduction from non-linux specific code. (Closed)
Patch Set: rebase Created 3 years, 9 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_service_client.cc ('k') | device/vr/vr_device_manager.cc » ('j') | 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.h" 5 #include "device/vr/vr_device.h"
6 #include "device/vr/vr_device_provider.h" 6 #include "device/vr/vr_device_provider.h"
7 #include "device/vr/vr_display_impl.h" 7 #include "device/vr/vr_display_impl.h"
8 8
9 namespace device { 9 namespace device {
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 void VRDevice::OnChanged() { 46 void VRDevice::OnChanged() {
47 base::Callback<void(mojom::VRDisplayInfoPtr)> callback = base::Bind( 47 base::Callback<void(mojom::VRDisplayInfoPtr)> callback = base::Bind(
48 &VRDevice::OnVRDisplayInfoCreated, weak_ptr_factory_.GetWeakPtr()); 48 &VRDevice::OnVRDisplayInfoCreated, weak_ptr_factory_.GetWeakPtr());
49 GetVRDevice(callback); 49 GetVRDevice(callback);
50 } 50 }
51 51
52 void VRDevice::OnVRDisplayInfoCreated(mojom::VRDisplayInfoPtr vr_device_info) { 52 void VRDevice::OnVRDisplayInfoCreated(mojom::VRDisplayInfoPtr vr_device_info) {
53 if (vr_device_info.is_null()) 53 if (vr_device_info.is_null())
54 return; 54 return;
55 for (const auto& display : displays_) 55 for (auto* display : displays_)
56 display->client()->OnChanged(vr_device_info.Clone()); 56 display->client()->OnChanged(vr_device_info.Clone());
57 } 57 }
58 58
59 void VRDevice::OnExitPresent() { 59 void VRDevice::OnExitPresent() {
60 if (!presenting_display_) 60 if (!presenting_display_)
61 return; 61 return;
62 auto it = displays_.find(presenting_display_); 62 auto it = displays_.find(presenting_display_);
63 CHECK(it != displays_.end()); 63 CHECK(it != displays_.end());
64 (*it)->client()->OnExitPresent(); 64 (*it)->client()->OnExitPresent();
65 SetPresentingDisplay(nullptr); 65 SetPresentingDisplay(nullptr);
66 } 66 }
67 67
68 void VRDevice::OnBlur() { 68 void VRDevice::OnBlur() {
69 for (const auto& display : displays_) 69 for (auto* display : displays_)
70 display->client()->OnBlur(); 70 display->client()->OnBlur();
71 } 71 }
72 72
73 void VRDevice::OnFocus() { 73 void VRDevice::OnFocus() {
74 for (const auto& display : displays_) 74 for (auto* display : displays_)
75 display->client()->OnFocus(); 75 display->client()->OnFocus();
76 } 76 }
77 77
78 void VRDevice::OnActivate(mojom::VRDisplayEventReason reason) { 78 void VRDevice::OnActivate(mojom::VRDisplayEventReason reason) {
79 for (const auto& display : displays_) 79 for (auto* display : displays_)
80 display->client()->OnActivate(reason); 80 display->client()->OnActivate(reason);
81 } 81 }
82 82
83 void VRDevice::OnDeactivate(mojom::VRDisplayEventReason reason) { 83 void VRDevice::OnDeactivate(mojom::VRDisplayEventReason reason) {
84 for (const auto& display : displays_) 84 for (auto* display : displays_)
85 display->client()->OnDeactivate(reason); 85 display->client()->OnDeactivate(reason);
86 } 86 }
87 87
88 void VRDevice::SetPresentingDisplay(VRDisplayImpl* display) { 88 void VRDevice::SetPresentingDisplay(VRDisplayImpl* display) {
89 presenting_display_ = display; 89 presenting_display_ = display;
90 } 90 }
91 91
92 } // namespace device 92 } // namespace device
OLDNEW
« no previous file with comments | « device/vr/test/fake_vr_service_client.cc ('k') | device/vr/vr_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698