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

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

Issue 2950173002: VR: System indicator rework. (Closed)
Patch Set: Address comments; increase size slightly for readability, now that position is dynamic. 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 weak_scene_manager_)); 231 weak_scene_manager_));
226 } 232 }
227 233
228 void VrGLThread::CleanUp() { 234 void VrGLThread::CleanUp() {
229 scene_manager_.reset(); 235 scene_manager_.reset();
230 vr_shell_gl_.reset(); 236 vr_shell_gl_.reset();
231 scene_.reset(); 237 scene_.reset();
232 } 238 }
233 239
234 } // namespace vr_shell 240 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gl_thread.h ('k') | chrome/browser/android/vr_shell/vr_shell_gl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698