| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } | 111 } |
| 112 | 112 |
| 113 void VrGLThread::SetHistoryButtonsEnabled(bool can_go_back, | 113 void VrGLThread::SetHistoryButtonsEnabled(bool can_go_back, |
| 114 bool can_go_forward) { | 114 bool can_go_forward) { |
| 115 WaitUntilThreadStarted(); | 115 WaitUntilThreadStarted(); |
| 116 task_runner()->PostTask( | 116 task_runner()->PostTask( |
| 117 FROM_HERE, base::Bind(&UiSceneManager::SetHistoryButtonsEnabled, | 117 FROM_HERE, base::Bind(&UiSceneManager::SetHistoryButtonsEnabled, |
| 118 weak_scene_manager_, can_go_forward, can_go_back)); | 118 weak_scene_manager_, can_go_forward, can_go_back)); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void VrGLThread::SetLoadProgress(double progress) { | 121 void VrGLThread::SetLoadProgress(float progress) { |
| 122 WaitUntilThreadStarted(); | 122 WaitUntilThreadStarted(); |
| 123 task_runner()->PostTask(FROM_HERE, | 123 task_runner()->PostTask(FROM_HERE, |
| 124 base::Bind(&UiSceneManager::SetLoadProgress, | 124 base::Bind(&UiSceneManager::SetLoadProgress, |
| 125 weak_scene_manager_, progress)); | 125 weak_scene_manager_, progress)); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void VrGLThread::SetLoading(bool loading) { | 128 void VrGLThread::SetLoading(bool loading) { |
| 129 WaitUntilThreadStarted(); | 129 WaitUntilThreadStarted(); |
| 130 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetLoading, | 130 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetLoading, |
| 131 weak_scene_manager_, loading)); | 131 weak_scene_manager_, loading)); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 157 weak_scene_manager_, secure)); | 157 weak_scene_manager_, secure)); |
| 158 } | 158 } |
| 159 | 159 |
| 160 void VrGLThread::CleanUp() { | 160 void VrGLThread::CleanUp() { |
| 161 scene_manager_.reset(); | 161 scene_manager_.reset(); |
| 162 vr_shell_gl_.reset(); | 162 vr_shell_gl_.reset(); |
| 163 scene_.reset(); | 163 scene_.reset(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 } // namespace vr_shell | 166 } // namespace vr_shell |
| OLD | NEW |