Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Side by Side Diff: chrome/browser/android/vr_shell/vr_gl_thread.cc

Issue 2877133002: VR: Add a loading indicator to the scene. (Closed)
Patch Set: Add units to timeout constant. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698