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

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

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/test/fake_vr_display_impl_client.h ('k') | device/vr/vr_device.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 #ifndef DEVICE_VR_VR_DEVICE_H 5 #ifndef DEVICE_VR_VR_DEVICE_H
6 #define DEVICE_VR_VR_DEVICE_H 6 #define DEVICE_VR_VR_DEVICE_H
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "device/vr/vr_export.h" 10 #include "device/vr/vr_export.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 virtual void AddDisplay(VRDisplayImpl* display); 47 virtual void AddDisplay(VRDisplayImpl* display);
48 virtual void RemoveDisplay(VRDisplayImpl* display); 48 virtual void RemoveDisplay(VRDisplayImpl* display);
49 49
50 virtual bool IsAccessAllowed(VRDisplayImpl* display); 50 virtual bool IsAccessAllowed(VRDisplayImpl* display);
51 virtual bool CheckPresentingDisplay(VRDisplayImpl* display); 51 virtual bool CheckPresentingDisplay(VRDisplayImpl* display);
52 52
53 virtual void OnChanged(); 53 virtual void OnChanged();
54 virtual void OnExitPresent(); 54 virtual void OnExitPresent();
55 virtual void OnBlur(); 55 virtual void OnBlur();
56 virtual void OnFocus(); 56 virtual void OnFocus();
57 virtual void OnActivate(mojom::VRDisplayEventReason reason); 57 virtual void OnActivate(mojom::VRDisplayEventReason reason,
58 const base::Callback<void(bool)>& on_handled);
58 virtual void OnDeactivate(mojom::VRDisplayEventReason reason); 59 virtual void OnDeactivate(mojom::VRDisplayEventReason reason);
59 60
60 protected: 61 protected:
61 friend class VRDisplayImpl; 62 friend class VRDisplayImpl;
62 friend class VRDisplayImplTest; 63 friend class VRDisplayImplTest;
63 64
64 void SetPresentingDisplay(VRDisplayImpl* display); 65 void SetPresentingDisplay(VRDisplayImpl* display);
65 66
66 private: 67 private:
67 void OnVRDisplayInfoCreated(mojom::VRDisplayInfoPtr vr_device_info); 68 void OnVRDisplayInfoCreated(mojom::VRDisplayInfoPtr vr_device_info);
68 69
69 std::set<VRDisplayImpl*> displays_; 70 std::set<VRDisplayImpl*> displays_;
70 71
71 VRDisplayImpl* presenting_display_; 72 VRDisplayImpl* presenting_display_;
72 73
73 unsigned int id_; 74 unsigned int id_;
74 75
75 static unsigned int next_id_; 76 static unsigned int next_id_;
76 77
77 base::WeakPtrFactory<VRDevice> weak_ptr_factory_; 78 base::WeakPtrFactory<VRDevice> weak_ptr_factory_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(VRDevice); 80 DISALLOW_COPY_AND_ASSIGN(VRDevice);
80 }; 81 };
81 82
82 } // namespace device 83 } // namespace device
83 84
84 #endif // DEVICE_VR_VR_DEVICE_H 85 #endif // DEVICE_VR_VR_DEVICE_H
OLDNEW
« no previous file with comments | « device/vr/test/fake_vr_display_impl_client.h ('k') | device/vr/vr_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698