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

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

Issue 2941293002: VR: Use more accurate timestamps for input events. (Closed)
Patch Set: Address comments 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/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"
23 #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"
24 #include "ui/gfx/geometry/quaternion.h" 25 #include "ui/gfx/geometry/quaternion.h"
25 #include "ui/gfx/geometry/rect_f.h" 26 #include "ui/gfx/geometry/rect_f.h"
26 #include "ui/gfx/native_widget_types.h" 27 #include "ui/gfx/native_widget_types.h"
27 28
28 namespace blink { 29 namespace blink {
29 class WebInputEvent; 30 class WebMouseEvent;
30 } 31 }
31 32
32 namespace gl { 33 namespace gl {
33 class GLContext; 34 class GLContext;
34 class GLFence; 35 class GLFence;
35 class GLSurface; 36 class GLSurface;
36 class ScopedJavaSurface; 37 class ScopedJavaSurface;
37 class SurfaceTexture; 38 class SurfaceTexture;
38 } 39 }
39 40
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 const gfx::Point& local_point_pixels); 152 const gfx::Point& local_point_pixels);
152 void SendButtonDown(UiElement* target, 153 void SendButtonDown(UiElement* target,
153 const gfx::PointF& target_point, 154 const gfx::PointF& target_point,
154 const gfx::Point& local_point_pixels); 155 const gfx::Point& local_point_pixels);
155 bool SendButtonUp(UiElement* target, 156 bool SendButtonUp(UiElement* target,
156 const gfx::PointF& target_point, 157 const gfx::PointF& target_point,
157 const gfx::Point& local_point_pixels); 158 const gfx::Point& local_point_pixels);
158 void SendTap(UiElement* target, 159 void SendTap(UiElement* target,
159 const gfx::PointF& target_point, 160 const gfx::PointF& target_point,
160 const gfx::Point& local_point_pixels); 161 const gfx::Point& local_point_pixels);
162 std::unique_ptr<blink::WebMouseEvent> MakeMouseEvent(
163 blink::WebInputEvent::Type type,
164 const gfx::Point& location);
161 void SendImmediateExitRequestIfNecessary(); 165 void SendImmediateExitRequestIfNecessary();
162 void GetVisualTargetElement(const gfx::Vector3dF& controller_direction, 166 void GetVisualTargetElement(const gfx::Vector3dF& controller_direction,
163 gfx::Vector3dF& eye_to_target, 167 gfx::Vector3dF& eye_to_target,
164 gfx::Point3F& target_point, 168 gfx::Point3F& target_point,
165 UiElement** target_element, 169 UiElement** target_element,
166 gfx::PointF& target_local_point) const; 170 gfx::PointF& target_local_point) const;
167 bool GetTargetLocalPoint(const gfx::Vector3dF& eye_to_target, 171 bool GetTargetLocalPoint(const gfx::Vector3dF& eye_to_target,
168 const UiElement& element, 172 const UiElement& element,
169 float max_distance_to_plane, 173 float max_distance_to_plane,
170 gfx::PointF& target_local_point, 174 gfx::PointF& target_local_point,
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 gfx::Point3F pointer_start_; 299 gfx::Point3F pointer_start_;
296 300
297 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_; 301 base::WeakPtrFactory<VrShellGl> weak_ptr_factory_;
298 302
299 DISALLOW_COPY_AND_ASSIGN(VrShellGl); 303 DISALLOW_COPY_AND_ASSIGN(VrShellGl);
300 }; 304 };
301 305
302 } // namespace vr_shell 306 } // namespace vr_shell
303 307
304 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_ 308 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_GL_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_controller.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