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

Unified Diff: chrome/browser/android/vr_shell/vr_shell_gl.h

Issue 2570553004: Clean up some VrShell threading issues and remove unnecessary WeakPtr types. (Closed)
Patch Set: rebase Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/vr_shell_gl.h
diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.h b/chrome/browser/android/vr_shell/vr_shell_gl.h
index 8bfe9a881b8fd0321a77ad2a54ea9a9be98c0edb..1f5d0e3315e50bc9fb025480a18dde73c3975703 100644
--- a/chrome/browser/android/vr_shell/vr_shell_gl.h
+++ b/chrome/browser/android/vr_shell/vr_shell_gl.h
@@ -52,12 +52,12 @@ class VrShellGl {
};
VrShellGl(
- VrShell* vr_shell,
const base::WeakPtr<VrShell>& weak_vr_shell,
const base::WeakPtr<VrInputManager>& content_input_manager,
const base::WeakPtr<VrInputManager>& ui_input_manager,
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner,
- gvr_context* gvr_api);
+ gvr_context* gvr_api,
+ bool initially_web_vr);
~VrShellGl();
bool Initialize();
@@ -161,7 +161,8 @@ class VrShellGl {
static constexpr int kPoseRingBufferSize = 8;
std::vector<gvr::Mat4f> webvr_head_pose_;
std::vector<bool> webvr_head_pose_valid_;
- jint webvr_texture_id_ = 0;
+ int webvr_texture_id_ = 0;
+ bool web_vr_mode_;
std::unique_ptr<VrController> controller_;
@@ -170,8 +171,6 @@ class VrShellGl {
base::TimeTicks vsync_timebase_;
base::TimeDelta vsync_interval_;
- // TODO(mthiesse): Remove thread-unsafe VrShell usage.
- VrShell* vr_shell_;
base::WeakPtr<VrShell> weak_vr_shell_;
base::WeakPtr<VrInputManager> content_input_manager_;
base::WeakPtr<VrInputManager> ui_input_manager_;
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_delegate.cc ('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