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

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

Issue 2950233002: Validate untrusted VR mojo inputs into browser process (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_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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/cancelable_callback.h" 13 #include "base/cancelable_callback.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/single_thread_task_runner.h" 17 #include "base/single_thread_task_runner.h"
18 #include "chrome/browser/android/vr_shell/vr_controller.h" 18 #include "chrome/browser/android/vr_shell/vr_controller.h"
19 #include "chrome/browser/android/vr_shell/vr_controller_model.h" 19 #include "chrome/browser/android/vr_shell/vr_controller_model.h"
20 #include "device/vr/vr_service.mojom.h" 20 #include "device/vr/vr_service.mojom.h"
21 #include "mojo/public/cpp/bindings/binding.h" 21 #include "mojo/public/cpp/bindings/binding.h"
22 #include "third_party/WebKit/public/platform/WebInputEvent.h" 22 #include "third_party/WebKit/public/platform/WebInputEvent.h"
23 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr.h" 23 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr.h"
24 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr_types.h" 24 #include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/ gvr_types.h"
25 #include "ui/gfx/geometry/quaternion.h" 25 #include "ui/gfx/geometry/quaternion.h"
26 #include "ui/gfx/geometry/rect_f.h" 26 #include "ui/gfx/geometry/rect_f.h"
27 #include "ui/gfx/geometry/size_f.h"
27 #include "ui/gfx/native_widget_types.h" 28 #include "ui/gfx/native_widget_types.h"
28 29
29 namespace blink { 30 namespace blink {
30 class WebMouseEvent; 31 class WebMouseEvent;
31 } 32 }
32 33
33 namespace gl { 34 namespace gl {
34 class GLContext; 35 class GLContext;
35 class GLFence; 36 class GLFence;
36 class GLSurface; 37 class GLSurface;
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 bool in_scroll_ = false; 252 bool in_scroll_ = false;
252 bool in_click_ = false; 253 bool in_click_ = false;
253 254
254 int content_tex_css_width_ = 0; 255 int content_tex_css_width_ = 0;
255 int content_tex_css_height_ = 0; 256 int content_tex_css_height_ = 0;
256 gfx::Size content_tex_physical_size_ = {0, 0}; 257 gfx::Size content_tex_physical_size_ = {0, 0};
257 gfx::Size webvr_surface_size_ = {0, 0}; 258 gfx::Size webvr_surface_size_ = {0, 0};
258 259
259 std::vector<base::TimeTicks> webvr_time_pose_; 260 std::vector<base::TimeTicks> webvr_time_pose_;
260 std::vector<base::TimeTicks> webvr_time_js_submit_; 261 std::vector<base::TimeTicks> webvr_time_js_submit_;
261 262 std::vector<bool> webvr_frame_oustanding_;
262 std::vector<gfx::Transform> webvr_head_pose_; 263 std::vector<gfx::Transform> webvr_head_pose_;
263 264
264 bool web_vr_mode_; 265 bool web_vr_mode_;
265 bool ready_to_draw_ = false; 266 bool ready_to_draw_ = false;
266 bool surfaceless_rendering_; 267 bool surfaceless_rendering_;
267 bool daydream_support_; 268 bool daydream_support_;
268 269
269 std::unique_ptr<VrController> controller_; 270 std::unique_ptr<VrController> controller_;
270 271
271 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 272 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
(...skipping 27 matching lines...) Expand all
299 gfx::Point3F pointer_start_; 300 gfx::Point3F pointer_start_;
300 301
301 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; 302 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_;
302 303
303 DISALLOW_COPY_AND_ASSIGN(VrShellGl); 304 DISALLOW_COPY_AND_ASSIGN(VrShellGl);
304 }; 305 };
305 306
306 } // namespace vr_shell 307 } // namespace vr_shell
307 308
308 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 309 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell_gl.cc » ('j') | chrome/browser/android/vr_shell/vr_shell_gl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698