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

Unified Diff: chrome/browser/android/vr_shell/vr_gesture.h

Issue 2380323003: Refactorings to vr controller code. (Closed)
Patch Set: Fix BUILD.gn Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/vr_gesture.h
diff --git a/chrome/browser/android/vr_shell/vr_gesture.h b/chrome/browser/android/vr_shell/vr_gesture.h
index 3a61c24b1ad39f1d08fd5b56a979796712077c0f..2e0be4b96c5cc1648f9e0589c25dfb4e6a1efb4e 100644
--- a/chrome/browser/android/vr_shell/vr_gesture.h
+++ b/chrome/browser/android/vr_shell/vr_gesture.h
@@ -12,13 +12,6 @@ using blink::WebInputEvent;
namespace vr_shell {
-typedef enum {
- GESTURE_DIRECTION_UP,
- GESTURE_DIRECTION_DOWN,
- GESTURE_DIRECTION_LEFT,
- GESTURE_DIRECTION_RIGHT
-} gesture_direction;
-
typedef struct {
gvr_vec3f delta;
int type;
@@ -43,43 +36,8 @@ typedef struct {
} GestureButtonsChange;
struct VrGesture {
- VrGesture() : type(WebInputEvent::Undefined) {}
- VrGesture(const GestureAngularMove&,
- int64_t start,
- int64_t end,
- gvr::Quatf quat)
- : start_time(start),
- end_time(end),
- type(WebInputEvent::MouseMove),
- quat(quat) {}
- VrGesture(const GestureScroll&,
- int64_t start,
- int64_t end,
- float dx,
- float dy,
- WebInputEvent::Type state,
- gvr::Quatf quat)
- : start_time(start), end_time(end), type(state), quat(quat) {
- details.scroll.delta.x = dx;
- details.scroll.delta.y = dy;
- details.scroll.stop_fling = 0;
- }
- VrGesture(const GestureButtonsChange&,
- int64_t start,
- int64_t end,
- unsigned down,
- unsigned up,
- gvr::Quatf quat)
- : start_time(start),
- end_time(end),
- type(WebInputEvent::GestureTap),
- quat(quat) {
- details.buttons.down = down;
- details.buttons.up = up;
- details.buttons.pos.x = 0;
- details.buttons.pos.y = 0;
- }
-
+ VrGesture() : start_time(0), end_time(0),
+ type(WebInputEvent::Undefined) {}
int64_t start_time, end_time;
enum WebInputEvent::Type type;
union {
@@ -87,10 +45,8 @@ struct VrGesture {
GestureButtonsChange buttons;
GestureAngularMove move;
} details;
- gvr::Quatf quat;
gvr::Vec2f velocity;
gvr::Vec2f displacement;
- gesture_direction direction;
};
} // namespace vr_shell
« no previous file with comments | « chrome/browser/android/vr_shell/vr_controller_manager.cc ('k') | chrome/browser/android/vr_shell/vr_input_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698