| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } | 121 } |
| 122 | 122 |
| 123 void VrGLThread::SetHistoryButtonsEnabled(bool can_go_back, | 123 void VrGLThread::SetHistoryButtonsEnabled(bool can_go_back, |
| 124 bool can_go_forward) { | 124 bool can_go_forward) { |
| 125 WaitUntilThreadStarted(); | 125 WaitUntilThreadStarted(); |
| 126 task_runner()->PostTask( | 126 task_runner()->PostTask( |
| 127 FROM_HERE, base::Bind(&UiSceneManager::SetHistoryButtonsEnabled, | 127 FROM_HERE, base::Bind(&UiSceneManager::SetHistoryButtonsEnabled, |
| 128 weak_scene_manager_, can_go_forward, can_go_back)); | 128 weak_scene_manager_, can_go_forward, can_go_back)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void VrGLThread::SetLoadProgress(double progress) { | 131 void VrGLThread::SetLoadProgress(float progress) { |
| 132 WaitUntilThreadStarted(); | 132 WaitUntilThreadStarted(); |
| 133 task_runner()->PostTask(FROM_HERE, | 133 task_runner()->PostTask(FROM_HERE, |
| 134 base::Bind(&UiSceneManager::SetLoadProgress, | 134 base::Bind(&UiSceneManager::SetLoadProgress, |
| 135 weak_scene_manager_, progress)); | 135 weak_scene_manager_, progress)); |
| 136 } | 136 } |
| 137 | 137 |
| 138 void VrGLThread::SetLoading(bool loading) { | 138 void VrGLThread::SetLoading(bool loading) { |
| 139 WaitUntilThreadStarted(); | 139 WaitUntilThreadStarted(); |
| 140 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetLoading, | 140 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetLoading, |
| 141 weak_scene_manager_, loading)); | 141 weak_scene_manager_, loading)); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 167 weak_scene_manager_, secure)); | 167 weak_scene_manager_, secure)); |
| 168 } | 168 } |
| 169 | 169 |
| 170 void VrGLThread::CleanUp() { | 170 void VrGLThread::CleanUp() { |
| 171 scene_manager_.reset(); | 171 scene_manager_.reset(); |
| 172 vr_shell_gl_.reset(); | 172 vr_shell_gl_.reset(); |
| 173 scene_.reset(); | 173 scene_.reset(); |
| 174 } | 174 } |
| 175 | 175 |
| 176 } // namespace vr_shell | 176 } // namespace vr_shell |
| OLD | NEW |