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

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

Issue 2694103006: Inject vr controller events into Android Native UI. (Closed)
Patch Set: Fix presubmit Created 3 years, 10 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_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 // Returns true if the touch position is within the slop of the initial touch 103 // Returns true if the touch position is within the slop of the initial touch
104 // point, false otherwise. 104 // point, false otherwise.
105 bool InSlop(const gvr::Vec2f touch_position); 105 bool InSlop(const gvr::Vec2f touch_position);
106 106
107 // Returns true if the gesture is in horizontal direction. 107 // Returns true if the gesture is in horizontal direction.
108 bool IsHorizontalGesture(); 108 bool IsHorizontalGesture();
109 109
110 void Reset(); 110 void Reset();
111 111
112 // Update gesture parameters, 112 void UpdateGestureParameters();
113 void UpdateGesture(WebGestureEvent* gesture);
114 113
115 // If the user is touching the touch pad and the touch point is different from 114 // If the user is touching the touch pad and the touch point is different from
116 // before, update the touch point and return true. Otherwise, return false. 115 // before, update the touch point and return true. Otherwise, return false.
117 bool UpdateCurrentTouchpoint(); 116 bool UpdateCurrentTouchpoint();
118 117
119 void UpdateOverallVelocity(); 118 void UpdateOverallVelocity();
120 119
121 // State of gesture detector. 120 // State of gesture detector.
122 GestureDetectorState state_; 121 GestureDetectorState state_;
123 122
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 156
158 // Number of consecutively extrapolated touch points 157 // Number of consecutively extrapolated touch points
159 int extrapolated_touch_ = 0; 158 int extrapolated_touch_ = 0;
160 159
161 DISALLOW_COPY_AND_ASSIGN(VrController); 160 DISALLOW_COPY_AND_ASSIGN(VrController);
162 }; 161 };
163 162
164 } // namespace vr_shell 163 } // namespace vr_shell
165 164
166 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_H_ 165 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/android_ui_gesture_target.cc ('k') | chrome/browser/android/vr_shell/vr_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698