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

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

Issue 2950173002: VR: System indicator rework. (Closed)
Patch Set: Cleanup. Created 3 years, 6 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 main_thread_task_runner_->PostTask( 124 main_thread_task_runner_->PostTask(
125 FROM_HERE, base::Bind(&VrShell::ExitCct, weak_vr_shell_)); 125 FROM_HERE, base::Bind(&VrShell::ExitCct, weak_vr_shell_));
126 } 126 }
127 127
128 void VrGLThread::ToggleCardboardGamepad(bool enabled) { 128 void VrGLThread::ToggleCardboardGamepad(bool enabled) {
129 main_thread_task_runner_->PostTask( 129 main_thread_task_runner_->PostTask(
130 FROM_HERE, 130 FROM_HERE,
131 base::Bind(&VrShell::ToggleCardboardGamepad, weak_vr_shell_, enabled)); 131 base::Bind(&VrShell::ToggleCardboardGamepad, weak_vr_shell_, enabled));
132 } 132 }
133 133
134 void VrGLThread::OnGLInitialized() {
135 task_runner()->PostTask(
136 FROM_HERE,
137 base::Bind(&UiSceneManager::OnGLInitialized, weak_scene_manager_));
138 }
139
134 void VrGLThread::OnUnsupportedMode(UiUnsupportedMode mode) { 140 void VrGLThread::OnUnsupportedMode(UiUnsupportedMode mode) {
135 main_thread_task_runner_->PostTask( 141 main_thread_task_runner_->PostTask(
136 FROM_HERE, 142 FROM_HERE,
137 base::Bind(&VrShell::ExitVrDueToUnsupportedMode, weak_vr_shell_, mode)); 143 base::Bind(&VrShell::ExitVrDueToUnsupportedMode, weak_vr_shell_, mode));
138 } 144 }
139 145
140 void VrGLThread::SetFullscreen(bool enabled) { 146 void VrGLThread::SetFullscreen(bool enabled) {
141 WaitUntilThreadStarted(); 147 WaitUntilThreadStarted();
142 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetFullscreen, 148 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetFullscreen,
143 weak_scene_manager_, enabled)); 149 weak_scene_manager_, enabled));
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 weak_scene_manager_)); 229 weak_scene_manager_));
224 } 230 }
225 231
226 void VrGLThread::CleanUp() { 232 void VrGLThread::CleanUp() {
227 scene_manager_.reset(); 233 scene_manager_.reset();
228 vr_shell_gl_.reset(); 234 vr_shell_gl_.reset();
229 scene_.reset(); 235 scene_.reset();
230 } 236 }
231 237
232 } // namespace vr_shell 238 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698