| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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() { | 89 void VrGLThread::ExitPresent() { |
| 90 main_thread_task_runner_->PostTask( | 90 main_thread_task_runner_->PostTask( |
| 91 FROM_HERE, base::Bind(&VrShell::ExitPresent, weak_vr_shell_)); | 91 FROM_HERE, base::Bind(&VrShell::ExitPresent, weak_vr_shell_)); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void VrGLThread::ExitFullscreen() { |
| 95 main_thread_task_runner_->PostTask( |
| 96 FROM_HERE, base::Bind(&VrShell::ExitFullscreen, weak_vr_shell_)); |
| 97 } |
| 98 |
| 94 void VrGLThread::RunVRDisplayInfoCallback( | 99 void VrGLThread::RunVRDisplayInfoCallback( |
| 95 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, | 100 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, |
| 96 device::mojom::VRDisplayInfoPtr* info) { | 101 device::mojom::VRDisplayInfoPtr* info) { |
| 97 main_thread_task_runner_->PostTask(FROM_HERE, | 102 main_thread_task_runner_->PostTask(FROM_HERE, |
| 98 base::Bind(callback, base::Passed(info))); | 103 base::Bind(callback, base::Passed(info))); |
| 99 } | 104 } |
| 100 | 105 |
| 101 void VrGLThread::OnContentPaused(bool enabled) { | 106 void VrGLThread::OnContentPaused(bool enabled) { |
| 102 main_thread_task_runner_->PostTask( | 107 main_thread_task_runner_->PostTask( |
| 103 FROM_HERE, | 108 FROM_HERE, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 weak_scene_manager_, secure)); | 167 weak_scene_manager_, secure)); |
| 163 } | 168 } |
| 164 | 169 |
| 165 void VrGLThread::CleanUp() { | 170 void VrGLThread::CleanUp() { |
| 166 scene_manager_.reset(); | 171 scene_manager_.reset(); |
| 167 vr_shell_gl_.reset(); | 172 vr_shell_gl_.reset(); |
| 168 scene_.reset(); | 173 scene_.reset(); |
| 169 } | 174 } |
| 170 | 175 |
| 171 } // namespace vr_shell | 176 } // namespace vr_shell |
| OLD | NEW |