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

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

Issue 2777903008: Removed deprecated WebVR functionality (Closed)
Patch Set: Another test re-baseline Created 3 years, 8 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/vr_display_impl.h ('k') | device/vr/vr_service.mojom » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <utility> 5 #include <utility>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "device/vr/vr_device.h" 8 #include "device/vr/vr_device.h"
9 #include "device/vr/vr_device_manager.h" 9 #include "device/vr/vr_device_manager.h"
10 #include "device/vr/vr_service_impl.h" 10 #include "device/vr/vr_service_impl.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 VRDeviceManager* manager = VRDeviceManager::GetInstance(); 49 VRDeviceManager* manager = VRDeviceManager::GetInstance();
50 if (!manager->IsMostRecentlyListeningForActivate(service_)) 50 if (!manager->IsMostRecentlyListeningForActivate(service_))
51 return; 51 return;
52 client_->OnActivate(reason); 52 client_->OnActivate(reason);
53 } 53 }
54 54
55 void VRDisplayImpl::OnDeactivate(mojom::VRDisplayEventReason reason) { 55 void VRDisplayImpl::OnDeactivate(mojom::VRDisplayEventReason reason) {
56 client_->OnDeactivate(reason); 56 client_->OnDeactivate(reason);
57 } 57 }
58 58
59 void VRDisplayImpl::ResetPose() {
60 if (!device_->IsAccessAllowed(this))
61 return;
62
63 device_->ResetPose();
64 }
65
66 void VRDisplayImpl::RequestPresent(bool secure_origin, 59 void VRDisplayImpl::RequestPresent(bool secure_origin,
67 mojom::VRSubmitFrameClientPtr submit_client, 60 mojom::VRSubmitFrameClientPtr submit_client,
68 const RequestPresentCallback& callback) { 61 const RequestPresentCallback& callback) {
69 if (!device_->IsAccessAllowed(this)) { 62 if (!device_->IsAccessAllowed(this)) {
70 callback.Run(false); 63 callback.Run(false);
71 return; 64 return;
72 } 65 }
73 66
74 device_->RequestPresent( 67 device_->RequestPresent(
75 std::move(submit_client), 68 std::move(submit_client),
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 source_height); 105 source_height);
113 } 106 }
114 107
115 void VRDisplayImpl::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) { 108 void VRDisplayImpl::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) {
116 if (!device_->IsAccessAllowed(this)) { 109 if (!device_->IsAccessAllowed(this)) {
117 return; 110 return;
118 } 111 }
119 device_->GetVRVSyncProvider(std::move(request)); 112 device_->GetVRVSyncProvider(std::move(request));
120 } 113 }
121 } 114 }
OLDNEW
« no previous file with comments | « device/vr/vr_display_impl.h ('k') | device/vr/vr_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698