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

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

Issue 2867783002: App button click exits WebVR presentation. (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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 main_thread_task_runner_->PostTask( 76 main_thread_task_runner_->PostTask(
77 FROM_HERE, base::Bind(&VrShell::ProcessContentGesture, weak_vr_shell_, 77 FROM_HERE, base::Bind(&VrShell::ProcessContentGesture, weak_vr_shell_,
78 base::Passed(std::move(event)))); 78 base::Passed(std::move(event))));
79 } 79 }
80 80
81 void VrGLThread::ForceExitVr() { 81 void VrGLThread::ForceExitVr() {
82 main_thread_task_runner_->PostTask( 82 main_thread_task_runner_->PostTask(
83 FROM_HERE, base::Bind(&VrShell::ForceExitVr, weak_vr_shell_)); 83 FROM_HERE, base::Bind(&VrShell::ForceExitVr, weak_vr_shell_));
84 } 84 }
85 85
86 void VrGLThread::ExitPresent() {
87 main_thread_task_runner_->PostTask(
88 FROM_HERE, base::Bind(&VrShell::ExitPresent, weak_vr_shell_));
89 }
90
86 void VrGLThread::RunVRDisplayInfoCallback( 91 void VrGLThread::RunVRDisplayInfoCallback(
87 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, 92 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback,
88 device::mojom::VRDisplayInfoPtr* info) { 93 device::mojom::VRDisplayInfoPtr* info) {
89 main_thread_task_runner_->PostTask(FROM_HERE, 94 main_thread_task_runner_->PostTask(FROM_HERE,
90 base::Bind(callback, base::Passed(info))); 95 base::Bind(callback, base::Passed(info)));
91 } 96 }
92 97
93 void VrGLThread::OnContentPaused(bool enabled) { 98 void VrGLThread::OnContentPaused(bool enabled) {
94 main_thread_task_runner_->PostTask( 99 main_thread_task_runner_->PostTask(
95 FROM_HERE, 100 FROM_HERE,
96 base::Bind(&VrShell::OnContentPaused, weak_vr_shell_, enabled)); 101 base::Bind(&VrShell::OnContentPaused, weak_vr_shell_, enabled));
97 } 102 }
98 103
99 void VrGLThread::CleanUp() { 104 void VrGLThread::CleanUp() {
100 scene_manager_.reset(); 105 scene_manager_.reset();
101 vr_shell_gl_.reset(); 106 vr_shell_gl_.reset();
102 scene_.reset(); 107 scene_.reset();
103 } 108 }
104 109
105 } // namespace vr_shell 110 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698