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

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

Issue 2844833005: Tentatively goes into WebVR presentation mode if page listens to vrdisplayactivate. (Closed)
Patch Set: Fixed device unit tests Created 3 years, 7 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_device.h ('k') | device/vr/vr_display_impl.h » ('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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void VRDevice::OnBlur() { 62 void VRDevice::OnBlur() {
63 for (auto* display : displays_) 63 for (auto* display : displays_)
64 display->OnBlur(); 64 display->OnBlur();
65 } 65 }
66 66
67 void VRDevice::OnFocus() { 67 void VRDevice::OnFocus() {
68 for (auto* display : displays_) 68 for (auto* display : displays_)
69 display->OnFocus(); 69 display->OnFocus();
70 } 70 }
71 71
72 void VRDevice::OnActivate(mojom::VRDisplayEventReason reason) { 72 void VRDevice::OnActivate(mojom::VRDisplayEventReason reason,
73 const base::Callback<void(bool)>& on_handled) {
73 for (auto* display : displays_) 74 for (auto* display : displays_)
74 display->OnActivate(reason); 75 display->OnActivate(reason, on_handled);
75 } 76 }
76 77
77 void VRDevice::OnDeactivate(mojom::VRDisplayEventReason reason) { 78 void VRDevice::OnDeactivate(mojom::VRDisplayEventReason reason) {
78 for (auto* display : displays_) 79 for (auto* display : displays_)
79 display->OnDeactivate(reason); 80 display->OnDeactivate(reason);
80 } 81 }
81 82
82 void VRDevice::SetPresentingDisplay(VRDisplayImpl* display) { 83 void VRDevice::SetPresentingDisplay(VRDisplayImpl* display) {
83 presenting_display_ = display; 84 presenting_display_ = display;
84 } 85 }
85 86
86 } // namespace device 87 } // namespace device
OLDNEW
« no previous file with comments | « device/vr/vr_device.h ('k') | device/vr/vr_display_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698