| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 FROM_HERE, | 127 FROM_HERE, |
| 128 base::Bind(&VrShell::ToggleCardboardGamepad, weak_vr_shell_, enabled)); | 128 base::Bind(&VrShell::ToggleCardboardGamepad, weak_vr_shell_, enabled)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void VrGLThread::SetFullscreen(bool enabled) { | 131 void VrGLThread::SetFullscreen(bool enabled) { |
| 132 WaitUntilThreadStarted(); | 132 WaitUntilThreadStarted(); |
| 133 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetFullscreen, | 133 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetFullscreen, |
| 134 weak_scene_manager_, enabled)); | 134 weak_scene_manager_, enabled)); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void VrGLThread::SetIncognito(bool incognito) { |
| 138 WaitUntilThreadStarted(); |
| 139 task_runner()->PostTask( |
| 140 FROM_HERE, base::Bind(&UiSceneManager::SetIncognito, weak_scene_manager_, |
| 141 incognito)); |
| 142 } |
| 143 |
| 137 void VrGLThread::SetHistoryButtonsEnabled(bool can_go_back, | 144 void VrGLThread::SetHistoryButtonsEnabled(bool can_go_back, |
| 138 bool can_go_forward) { | 145 bool can_go_forward) { |
| 139 WaitUntilThreadStarted(); | 146 WaitUntilThreadStarted(); |
| 140 task_runner()->PostTask( | 147 task_runner()->PostTask( |
| 141 FROM_HERE, base::Bind(&UiSceneManager::SetHistoryButtonsEnabled, | 148 FROM_HERE, base::Bind(&UiSceneManager::SetHistoryButtonsEnabled, |
| 142 weak_scene_manager_, can_go_forward, can_go_back)); | 149 weak_scene_manager_, can_go_forward, can_go_back)); |
| 143 } | 150 } |
| 144 | 151 |
| 145 void VrGLThread::SetLoadProgress(float progress) { | 152 void VrGLThread::SetLoadProgress(float progress) { |
| 146 WaitUntilThreadStarted(); | 153 WaitUntilThreadStarted(); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 weak_scene_manager_)); | 212 weak_scene_manager_)); |
| 206 } | 213 } |
| 207 | 214 |
| 208 void VrGLThread::CleanUp() { | 215 void VrGLThread::CleanUp() { |
| 209 scene_manager_.reset(); | 216 scene_manager_.reset(); |
| 210 vr_shell_gl_.reset(); | 217 vr_shell_gl_.reset(); |
| 211 scene_.reset(); | 218 scene_.reset(); |
| 212 } | 219 } |
| 213 | 220 |
| 214 } // namespace vr_shell | 221 } // namespace vr_shell |
| OLD | NEW |