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

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

Issue 2879973002: Expose Gamepad API instance for Cardboard button (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 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <queue> 9 #include <queue>
10 #include <utility> 10 #include <utility>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 VrShellGl(VrBrowserInterface* browser, 71 VrShellGl(VrBrowserInterface* browser,
72 gvr_context* gvr_api, 72 gvr_context* gvr_api,
73 bool initially_web_vr, 73 bool initially_web_vr,
74 bool reprojected_rendering, 74 bool reprojected_rendering,
75 UiScene* scene); 75 UiScene* scene);
76 ~VrShellGl() override; 76 ~VrShellGl() override;
77 77
78 void Initialize(); 78 void Initialize();
79 void InitializeGl(gfx::AcceleratedWidget window); 79 void InitializeGl(gfx::AcceleratedWidget window);
80 80
81 void OnTriggerEvent(); 81 void OnTriggerEvent(bool touched);
82 void OnPause(); 82 void OnPause();
83 void OnResume(); 83 void OnResume();
84 84
85 scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() { 85 scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() {
86 return task_runner_; 86 return task_runner_;
87 } 87 }
88 88
89 void SetWebVrMode(bool enabled); 89 void SetWebVrMode(bool enabled);
90 void CreateOrResizeWebVRSurface(const gfx::Size& size); 90 void CreateOrResizeWebVRSurface(const gfx::Size& size);
91 void CreateContentSurface(); 91 void CreateContentSurface();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 gfx::Size render_size_primary_; 184 gfx::Size render_size_primary_;
185 gfx::Size render_size_headlocked_; 185 gfx::Size render_size_headlocked_;
186 186
187 // Intended render_size_primary_ for use by VrShell, so that it 187 // Intended render_size_primary_ for use by VrShell, so that it
188 // can be restored after exiting WebVR mode. 188 // can be restored after exiting WebVR mode.
189 gfx::Size render_size_vrshell_; 189 gfx::Size render_size_vrshell_;
190 190
191 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; 191 std::unique_ptr<VrShellRenderer> vr_shell_renderer_;
192 192
193 bool touch_pending_ = false; 193 bool touch_pending_ = false;
194 bool currently_touched_ = false;
194 vr::Quatf controller_quat_; 195 vr::Quatf controller_quat_;
195 196
196 gfx::Point3F target_point_; 197 gfx::Point3F target_point_;
197 198
198 // Input targeting for non-content elements. 199 // Input targeting for non-content elements.
199 UiElement* target_element_ = nullptr; 200 UiElement* target_element_ = nullptr;
200 UiElement* previous_target_element_ = nullptr; 201 UiElement* previous_target_element_ = nullptr;
201 UiElement* click_target_element_ = nullptr; 202 UiElement* click_target_element_ = nullptr;
202 203
203 // Input targeting for the content element. 204 // Input targeting for the content element.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 gfx::Point3F pointer_start_; 246 gfx::Point3F pointer_start_;
246 247
247 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; 248 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_;
248 249
249 DISALLOW_COPY_AND_ASSIGN(VrShellGl); 250 DISALLOW_COPY_AND_ASSIGN(VrShellGl);
250 }; 251 };
251 252
252 } // namespace vr_shell 253 } // namespace vr_shell
253 254
254 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 255 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698