| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 main_thread_task_runner_->PostTask(FROM_HERE, | 92 main_thread_task_runner_->PostTask(FROM_HERE, |
| 93 base::Bind(callback, base::Passed(info))); | 93 base::Bind(callback, base::Passed(info))); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void VrGLThread::OnContentPaused(bool enabled) { | 96 void VrGLThread::OnContentPaused(bool enabled) { |
| 97 main_thread_task_runner_->PostTask( | 97 main_thread_task_runner_->PostTask( |
| 98 FROM_HERE, | 98 FROM_HERE, |
| 99 base::Bind(&VrShell::OnContentPaused, weak_vr_shell_, enabled)); | 99 base::Bind(&VrShell::OnContentPaused, weak_vr_shell_, enabled)); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void VrGLThread::NavigateBack() { |
| 103 main_thread_task_runner_->PostTask( |
| 104 FROM_HERE, base::Bind(&VrShell::NavigateBack, weak_vr_shell_)); |
| 105 } |
| 106 |
| 102 void VrGLThread::SetFullscreen(bool enabled) { | 107 void VrGLThread::SetFullscreen(bool enabled) { |
| 103 WaitUntilThreadStarted(); | 108 WaitUntilThreadStarted(); |
| 104 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetFullscreen, | 109 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetFullscreen, |
| 105 weak_scene_manager_, enabled)); | 110 weak_scene_manager_, enabled)); |
| 106 } | 111 } |
| 107 | 112 |
| 108 void VrGLThread::SetHistoryButtonsEnabled(bool can_go_back, | 113 void VrGLThread::SetHistoryButtonsEnabled(bool can_go_back, |
| 109 bool can_go_forward) { | 114 bool can_go_forward) { |
| 110 WaitUntilThreadStarted(); | 115 WaitUntilThreadStarted(); |
| 111 task_runner()->PostTask( | 116 task_runner()->PostTask( |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 weak_scene_manager_, secure)); | 157 weak_scene_manager_, secure)); |
| 153 } | 158 } |
| 154 | 159 |
| 155 void VrGLThread::CleanUp() { | 160 void VrGLThread::CleanUp() { |
| 156 scene_manager_.reset(); | 161 scene_manager_.reset(); |
| 157 vr_shell_gl_.reset(); | 162 vr_shell_gl_.reset(); |
| 158 scene_.reset(); | 163 scene_.reset(); |
| 159 } | 164 } |
| 160 | 165 |
| 161 } // namespace vr_shell | 166 } // namespace vr_shell |
| OLD | NEW |