| 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 #include "chrome/browser/android/vr_shell/vr_gl_thread.h" | 5 #include "chrome/browser/android/vr_shell/vr_gl_thread.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "chrome/browser/android/vr_shell/ui_interface.h" | 9 #include "chrome/browser/android/vr_shell/ui_interface.h" |
| 10 #include "chrome/browser/android/vr_shell/ui_scene.h" | 10 #include "chrome/browser/android/vr_shell/ui_scene.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 main_thread_task_runner_->PostTask( | 79 main_thread_task_runner_->PostTask( |
| 80 FROM_HERE, base::Bind(&VrShell::ProcessContentGesture, weak_vr_shell_, | 80 FROM_HERE, base::Bind(&VrShell::ProcessContentGesture, weak_vr_shell_, |
| 81 base::Passed(std::move(event)))); | 81 base::Passed(std::move(event)))); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void VrGLThread::ForceExitVr() { | 84 void VrGLThread::ForceExitVr() { |
| 85 main_thread_task_runner_->PostTask( | 85 main_thread_task_runner_->PostTask( |
| 86 FROM_HERE, base::Bind(&VrShell::ForceExitVr, weak_vr_shell_)); | 86 FROM_HERE, base::Bind(&VrShell::ForceExitVr, weak_vr_shell_)); |
| 87 } | 87 } |
| 88 | 88 |
| 89 void VrGLThread::ExitPresent() { | |
| 90 main_thread_task_runner_->PostTask( | |
| 91 FROM_HERE, base::Bind(&VrShell::ExitPresent, weak_vr_shell_)); | |
| 92 } | |
| 93 | |
| 94 void VrGLThread::RunVRDisplayInfoCallback( | 89 void VrGLThread::RunVRDisplayInfoCallback( |
| 95 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, | 90 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, |
| 96 device::mojom::VRDisplayInfoPtr* info) { | 91 device::mojom::VRDisplayInfoPtr* info) { |
| 97 main_thread_task_runner_->PostTask(FROM_HERE, | 92 main_thread_task_runner_->PostTask(FROM_HERE, |
| 98 base::Bind(callback, base::Passed(info))); | 93 base::Bind(callback, base::Passed(info))); |
| 99 } | 94 } |
| 100 | 95 |
| 101 void VrGLThread::OnContentPaused(bool enabled) { | 96 void VrGLThread::OnContentPaused(bool enabled) { |
| 102 main_thread_task_runner_->PostTask( | 97 main_thread_task_runner_->PostTask( |
| 103 FROM_HERE, | 98 FROM_HERE, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 weak_scene_manager_, secure)); | 157 weak_scene_manager_, secure)); |
| 163 } | 158 } |
| 164 | 159 |
| 165 void VrGLThread::CleanUp() { | 160 void VrGLThread::CleanUp() { |
| 166 scene_manager_.reset(); | 161 scene_manager_.reset(); |
| 167 vr_shell_gl_.reset(); | 162 vr_shell_gl_.reset(); |
| 168 scene_.reset(); | 163 scene_.reset(); |
| 169 } | 164 } |
| 170 | 165 |
| 171 } // namespace vr_shell | 166 } // namespace vr_shell |
| OLD | NEW |