| OLD | NEW |
| 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 #ifndef DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H | 5 #ifndef DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H |
| 6 #define DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H | 6 #define DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 void GetDevices(std::vector<VRDevice*>* devices) override; | 27 void GetDevices(std::vector<VRDevice*>* devices) override; |
| 28 void Initialize() override; | 28 void Initialize() override; |
| 29 | 29 |
| 30 // Called from GvrDevice | 30 // Called from GvrDevice |
| 31 bool RequestPresent(); | 31 bool RequestPresent(); |
| 32 void ExitPresent(); | 32 void ExitPresent(); |
| 33 | 33 |
| 34 // Called from GvrDelegate | 34 // Called from GvrDelegate |
| 35 void OnGvrDelegateReady(GvrDelegate* delegate); | 35 void OnGvrDelegateReady(GvrDelegate* delegate); |
| 36 void OnGvrDelegateRemoved(); | 36 void OnGvrDelegateRemoved(); |
| 37 void PausePresent(); |
| 38 void ResumePresent(); |
| 37 | 39 |
| 38 void SetClient(VRClientDispatcher* client) override; | 40 void SetClient(VRClientDispatcher* client) override; |
| 39 | 41 |
| 40 private: | 42 private: |
| 41 void GvrDelegateReady(GvrDelegate* delegate); | 43 void GvrDelegateReady(GvrDelegate* delegate); |
| 42 void GvrDelegateRemoved(); | 44 void GvrDelegateRemoved(); |
| 43 | 45 |
| 44 std::unique_ptr<VRClientDispatcher> client_; | 46 std::unique_ptr<VRClientDispatcher> client_; |
| 45 std::unique_ptr<GvrDevice> vr_device_; | 47 std::unique_ptr<GvrDevice> vr_device_; |
| 46 | 48 |
| 47 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 49 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 48 | 50 |
| 49 DISALLOW_COPY_AND_ASSIGN(GvrDeviceProvider); | 51 DISALLOW_COPY_AND_ASSIGN(GvrDeviceProvider); |
| 50 }; | 52 }; |
| 51 | 53 |
| 52 } // namespace device | 54 } // namespace device |
| 53 | 55 |
| 54 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H | 56 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_PROVIDER_H |
| OLD | NEW |