| OLD | NEW |
| 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 12 matching lines...) Expand all Loading... |
| 23 VRDevice(); | 23 VRDevice(); |
| 24 virtual ~VRDevice(); | 24 virtual ~VRDevice(); |
| 25 | 25 |
| 26 unsigned int id() const { return id_; } | 26 unsigned int id() const { return id_; } |
| 27 | 27 |
| 28 // Queries VR device for display info and calls onCreated once the display | 28 // Queries VR device for display info and calls onCreated once the display |
| 29 // info object is created. If the query fails onCreated will be called with a | 29 // info object is created. If the query fails onCreated will be called with a |
| 30 // nullptr as argument. onCreated can be called before this function returns. | 30 // nullptr as argument. onCreated can be called before this function returns. |
| 31 virtual void CreateVRDisplayInfo( | 31 virtual void CreateVRDisplayInfo( |
| 32 const base::Callback<void(mojom::VRDisplayInfoPtr)>& on_created) = 0; | 32 const base::Callback<void(mojom::VRDisplayInfoPtr)>& on_created) = 0; |
| 33 virtual void ResetPose() = 0; | |
| 34 | 33 |
| 35 virtual void RequestPresent(mojom::VRSubmitFrameClientPtr submit_client, | 34 virtual void RequestPresent(mojom::VRSubmitFrameClientPtr submit_client, |
| 36 const base::Callback<void(bool)>& callback) = 0; | 35 const base::Callback<void(bool)>& callback) = 0; |
| 37 virtual void SetSecureOrigin(bool secure_origin) = 0; | 36 virtual void SetSecureOrigin(bool secure_origin) = 0; |
| 38 virtual void ExitPresent() = 0; | 37 virtual void ExitPresent() = 0; |
| 39 virtual void SubmitFrame(int16_t frame_index, | 38 virtual void SubmitFrame(int16_t frame_index, |
| 40 const gpu::MailboxHolder& mailbox) = 0; | 39 const gpu::MailboxHolder& mailbox) = 0; |
| 41 virtual void UpdateLayerBounds(int16_t frame_index, | 40 virtual void UpdateLayerBounds(int16_t frame_index, |
| 42 mojom::VRLayerBoundsPtr left_bounds, | 41 mojom::VRLayerBoundsPtr left_bounds, |
| 43 mojom::VRLayerBoundsPtr right_bounds, | 42 mojom::VRLayerBoundsPtr right_bounds, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 static unsigned int next_id_; | 75 static unsigned int next_id_; |
| 77 | 76 |
| 78 base::WeakPtrFactory<VRDevice> weak_ptr_factory_; | 77 base::WeakPtrFactory<VRDevice> weak_ptr_factory_; |
| 79 | 78 |
| 80 DISALLOW_COPY_AND_ASSIGN(VRDevice); | 79 DISALLOW_COPY_AND_ASSIGN(VRDevice); |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 } // namespace device | 82 } // namespace device |
| 84 | 83 |
| 85 #endif // DEVICE_VR_VR_DEVICE_H | 84 #endif // DEVICE_VR_VR_DEVICE_H |
| OLD | NEW |