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

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

Issue 2380323003: Refactorings to vr controller code. (Closed)
Patch Set: Created 4 years, 3 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_controller.h
diff --git a/chrome/browser/android/vr_shell/vr_controller.h b/chrome/browser/android/vr_shell/vr_controller.h
index 7291d5b067ac1e87e7bd1b356b0535e0e54b599a..83f26b24e391d7f8396e3f78262795f69a6d7b66 100644
--- a/chrome/browser/android/vr_shell/vr_controller.h
+++ b/chrome/browser/android/vr_shell/vr_controller.h
@@ -30,7 +30,7 @@ class VrController {
// Must be called when the GL renderer gets OnDrawFrame().
void UpdateState();
- VrGesture DetectGesture();
+ std::unique_ptr<VrGesture> DetectGesture();
bool IsTouching();
@@ -88,12 +88,7 @@ class VrController {
// Handle the scrolling state.
void HandleScrollingState();
- void Update(const gvr_controller_state* controller_state);
- void Update(bool touch_up,
- bool touch_down,
- bool is_touching,
- const gvr::Vec2f position,
- int64_t timestamp);
+ void Update();
// Returns true if the touch position is within the slop of the initial touch
// point, false otherwise.
@@ -101,10 +96,6 @@ class VrController {
void Reset();
- size_t GetGestureListSize() { return gesture_list_.size(); }
-
- const VrGesture* GetGesturePtr(const size_t index);
-
// Update gesture parameters,
void UpdateGesture(VrGesture* gesture);
@@ -124,7 +115,7 @@ class VrController {
bool pinch_started_;
bool zoom_in_progress_ = false;
- std::vector<VrGesture> gesture_list_;
+ std::unique_ptr<VrGesture> gesture_;
asimjour 2016/10/03 14:40:16 We should be able to send multiple gestures. For e
mthiesse 2016/10/03 15:39:15 Sure, but right now the API only supports returnin
std::unique_ptr<TouchInfo> touch_info_;
// A pointer storing the touch point from previous frame.
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_controller.cc » ('j') | chrome/browser/android/vr_shell/vr_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698