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

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

Issue 2493063004: Fix exiting WebVR via Android UI not fully exiting fullscreen. (Closed)
Patch Set: 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 unified diff | Download patch
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_service_impl.h" 7 #include "device/vr/vr_service_impl.h"
8 8
9 namespace device { 9 namespace device {
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 if (vr_device_info.is_null()) 47 if (vr_device_info.is_null())
48 return; 48 return;
49 49
50 for (const auto& display : displays_) { 50 for (const auto& display : displays_) {
51 mojom::VRDisplayClient* client = display.second->client(); 51 mojom::VRDisplayClient* client = display.second->client();
52 if (client) 52 if (client)
53 client->OnDisplayChanged(vr_device_info.Clone()); 53 client->OnDisplayChanged(vr_device_info.Clone());
54 } 54 }
55 } 55 }
56 56
57 void VRDevice::OnExitPresent(VRServiceImpl* service) { 57 void VRDevice::OnExitPresent() {
58 DisplayClientMap::iterator it = displays_.find(service); 58 DisplayClientMap::iterator it = displays_.find(presenting_service_);
59 if (it != displays_.end()) { 59 if (it != displays_.end()) {
60 mojom::VRDisplayClient* client = it->second->client(); 60 mojom::VRDisplayClient* client = it->second->client();
61 if (client) 61 if (client)
62 client->OnExitPresent(); 62 client->OnExitPresent();
63 } 63 }
64
65 presenting_service_ = nullptr;
64 } 66 }
65 67
66 } // namespace device 68 } // namespace device
OLDNEW
« device/vr/android/gvr/gvr_device_provider.cc ('K') | « device/vr/vr_device.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698