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

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

Issue 2834543006: Hook up insecure content warnings for http webVR presentation. (Closed)
Patch Set: rebase Created 3 years, 8 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_scene.h" 9 #include "chrome/browser/android/vr_shell/ui_scene.h"
10 #include "chrome/browser/android/vr_shell/ui_scene_manager.h" 10 #include "chrome/browser/android/vr_shell/ui_scene_manager.h"
(...skipping 15 matching lines...) Expand all
26 gvr_api_(gvr_api), 26 gvr_api_(gvr_api),
27 initially_web_vr_(initially_web_vr), 27 initially_web_vr_(initially_web_vr),
28 reprojected_rendering_(reprojected_rendering) {} 28 reprojected_rendering_(reprojected_rendering) {}
29 29
30 VrGLThread::~VrGLThread() { 30 VrGLThread::~VrGLThread() {
31 Stop(); 31 Stop();
32 } 32 }
33 33
34 void VrGLThread::Init() { 34 void VrGLThread::Init() {
35 scene_ = base::MakeUnique<UiScene>(); 35 scene_ = base::MakeUnique<UiScene>();
36 scene_manager_ = base::MakeUnique<UiSceneManager>(scene_.get());
37 vr_shell_gl_ = base::MakeUnique<VrShellGl>( 36 vr_shell_gl_ = base::MakeUnique<VrShellGl>(
38 std::move(weak_vr_shell_), std::move(main_thread_task_runner_), gvr_api_, 37 std::move(weak_vr_shell_), std::move(main_thread_task_runner_), gvr_api_,
39 initially_web_vr_, reprojected_rendering_, scene_.get()); 38 initially_web_vr_, reprojected_rendering_, scene_.get());
39 scene_manager_ = base::MakeUnique<UiSceneManager>(scene_.get());
40
40 weak_vr_shell_gl_ = vr_shell_gl_->GetWeakPtr(); 41 weak_vr_shell_gl_ = vr_shell_gl_->GetWeakPtr();
41 weak_scene_manager_ = scene_manager_->GetWeakPtr(); 42 weak_scene_manager_ = scene_manager_->GetWeakPtr();
42 vr_shell_gl_->Initialize(); 43 vr_shell_gl_->Initialize();
43 } 44 }
44 45
45 void VrGLThread::CleanUp() { 46 void VrGLThread::CleanUp() {
47 scene_manager_.reset();
46 vr_shell_gl_.reset(); 48 vr_shell_gl_.reset();
47 scene_manager_.reset();
48 scene_.reset(); 49 scene_.reset();
49 } 50 }
50 51
51 } // namespace vr_shell 52 } // namespace vr_shell
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_unittest.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