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

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

Issue 2955483003: Show splash screen when entering VR from a deep-link (Closed)
Patch Set: . 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 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_THREAD_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_THREAD_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_THREAD_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_THREAD_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 17 matching lines...) Expand all
28 class VrGLThread : public base::Thread, 28 class VrGLThread : public base::Thread,
29 public GlBrowserInterface, 29 public GlBrowserInterface,
30 public UiBrowserInterface, 30 public UiBrowserInterface,
31 public UiInterface { 31 public UiInterface {
32 public: 32 public:
33 VrGLThread( 33 VrGLThread(
34 const base::WeakPtr<VrShell>& weak_vr_shell, 34 const base::WeakPtr<VrShell>& weak_vr_shell,
35 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner, 35 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner,
36 gvr_context* gvr_api, 36 gvr_context* gvr_api,
37 bool initially_web_vr, 37 bool initially_web_vr,
38 bool web_vr_autopresented, 38 bool web_vr_autopresentation_expected,
39 bool in_cct, 39 bool in_cct,
40 bool reprojected_rendering, 40 bool reprojected_rendering,
41 bool daydream_support); 41 bool daydream_support);
42 42
43 ~VrGLThread() override; 43 ~VrGLThread() override;
44 base::WeakPtr<VrShellGl> GetVrShellGl() { return weak_vr_shell_gl_; } 44 base::WeakPtr<VrShellGl> GetVrShellGl() { return weak_vr_shell_gl_; }
45 base::WeakPtr<UiSceneManager> GetSceneManager() { 45 base::WeakPtr<UiSceneManager> GetSceneManager() {
46 return weak_scene_manager_; 46 return weak_scene_manager_;
47 } 47 }
48 48
(...skipping 20 matching lines...) Expand all
69 void OnUnsupportedMode(UiUnsupportedMode mode) override; 69 void OnUnsupportedMode(UiUnsupportedMode mode) override;
70 70
71 // UiInterface implementation (VrShell and GL calling to the UI). 71 // UiInterface implementation (VrShell and GL calling to the UI).
72 void SetFullscreen(bool enabled) override; 72 void SetFullscreen(bool enabled) override;
73 void SetIncognito(bool incognito) override; 73 void SetIncognito(bool incognito) override;
74 void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward) override; 74 void SetHistoryButtonsEnabled(bool can_go_back, bool can_go_forward) override;
75 void SetLoadProgress(float progress) override; 75 void SetLoadProgress(float progress) override;
76 void SetLoading(bool loading) override; 76 void SetLoading(bool loading) override;
77 void SetSecurityLevel(security_state::SecurityLevel level) override; 77 void SetSecurityLevel(security_state::SecurityLevel level) override;
78 void SetURL(const GURL& gurl) override; 78 void SetURL(const GURL& gurl) override;
79 void SetWebVrMode(bool enabled, bool auto_presented) override; 79 void SetWebVrMode(bool enabled) override;
80 void SetWebVrSecureOrigin(bool secure) override; 80 void SetWebVrSecureOrigin(bool secure) override;
81 void SetVideoCapturingIndicator(bool enabled) override; 81 void SetVideoCapturingIndicator(bool enabled) override;
82 void SetScreenCapturingIndicator(bool enabled) override; 82 void SetScreenCapturingIndicator(bool enabled) override;
83 void SetAudioCapturingIndicator(bool enabled) override; 83 void SetAudioCapturingIndicator(bool enabled) override;
84 void SetIsExiting() override; 84 void SetIsExiting() override;
85 void SetSplashScreenIcon(SkBitmap bitmap) override;
85 86
86 protected: 87 protected:
87 void Init() override; 88 void Init() override;
88 void CleanUp() override; 89 void CleanUp() override;
89 90
90 private: 91 private:
91 // Created on GL thread. 92 // Created on GL thread.
92 std::unique_ptr<UiScene> scene_; 93 std::unique_ptr<UiScene> scene_;
93 std::unique_ptr<UiSceneManager> scene_manager_; 94 std::unique_ptr<UiSceneManager> scene_manager_;
94 base::WeakPtr<UiSceneManager> weak_scene_manager_; 95 base::WeakPtr<UiSceneManager> weak_scene_manager_;
95 std::unique_ptr<VrShellGl> vr_shell_gl_; 96 std::unique_ptr<VrShellGl> vr_shell_gl_;
96 base::WeakPtr<VrShellGl> weak_vr_shell_gl_; 97 base::WeakPtr<VrShellGl> weak_vr_shell_gl_;
97 98
98 // This state is used for initializing vr_shell_gl_. 99 // This state is used for initializing vr_shell_gl_.
99 base::WeakPtr<VrShell> weak_vr_shell_; 100 base::WeakPtr<VrShell> weak_vr_shell_;
100 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 101 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
101 gvr_context* gvr_api_; 102 gvr_context* gvr_api_;
102 bool initially_web_vr_; 103 bool initially_web_vr_;
103 bool web_vr_autopresented_; 104 bool web_vr_autopresentation_expected_;
104 bool in_cct_; 105 bool in_cct_;
105 bool reprojected_rendering_; 106 bool reprojected_rendering_;
106 bool daydream_support_; 107 bool daydream_support_;
107 108
108 DISALLOW_COPY_AND_ASSIGN(VrGLThread); 109 DISALLOW_COPY_AND_ASSIGN(VrGLThread);
109 }; 110 };
110 111
111 } // namespace vr_shell 112 } // namespace vr_shell
112 113
113 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_THREAD_H_ 114 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_GL_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698