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

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

Issue 2902393002: [vr] Bail on unhandled code points. (Closed)
Patch Set: . 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 main_thread_task_runner_->PostTask( 121 main_thread_task_runner_->PostTask(
122 FROM_HERE, base::Bind(&VrShell::ExitCct, weak_vr_shell_)); 122 FROM_HERE, base::Bind(&VrShell::ExitCct, weak_vr_shell_));
123 } 123 }
124 124
125 void VrGLThread::ToggleCardboardGamepad(bool enabled) { 125 void VrGLThread::ToggleCardboardGamepad(bool enabled) {
126 main_thread_task_runner_->PostTask( 126 main_thread_task_runner_->PostTask(
127 FROM_HERE, 127 FROM_HERE,
128 base::Bind(&VrShell::ToggleCardboardGamepad, weak_vr_shell_, enabled)); 128 base::Bind(&VrShell::ToggleCardboardGamepad, weak_vr_shell_, enabled));
129 } 129 }
130 130
131 void VrGLThread::OnUnsupportedMode(UiUnsupportedMode mode) {
132 main_thread_task_runner_->PostTask(
133 FROM_HERE,
134 base::Bind(&VrShell::ExitVrDueToUnsupportedMode, weak_vr_shell_, mode));
135 }
136
131 void VrGLThread::SetFullscreen(bool enabled) { 137 void VrGLThread::SetFullscreen(bool enabled) {
132 WaitUntilThreadStarted(); 138 WaitUntilThreadStarted();
133 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetFullscreen, 139 task_runner()->PostTask(FROM_HERE, base::Bind(&UiSceneManager::SetFullscreen,
134 weak_scene_manager_, enabled)); 140 weak_scene_manager_, enabled));
135 } 141 }
136 142
137 void VrGLThread::SetHistoryButtonsEnabled(bool can_go_back, 143 void VrGLThread::SetHistoryButtonsEnabled(bool can_go_back,
138 bool can_go_forward) { 144 bool can_go_forward) {
139 WaitUntilThreadStarted(); 145 WaitUntilThreadStarted();
140 task_runner()->PostTask( 146 task_runner()->PostTask(
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 weak_scene_manager_)); 211 weak_scene_manager_));
206 } 212 }
207 213
208 void VrGLThread::CleanUp() { 214 void VrGLThread::CleanUp() {
209 scene_manager_.reset(); 215 scene_manager_.reset();
210 vr_shell_gl_.reset(); 216 vr_shell_gl_.reset();
211 scene_.reset(); 217 scene_.reset();
212 } 218 }
213 219
214 } // namespace vr_shell 220 } // 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.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698