OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ATHENA_HOME_HOME_CARD_GESTURE_MANAGER_H_ | 5 #ifndef ATHENA_HOME_HOME_CARD_GESTURE_MANAGER_H_ |
6 #define ATHENA_HOME_HOME_CARD_GESTURE_MANAGER_H_ | 6 #define ATHENA_HOME_HOME_CARD_GESTURE_MANAGER_H_ |
7 | 7 |
8 #include "athena/home/public/home_card.h" | 8 #include "athena/home/public/home_card.h" |
9 #include "athena/athena_export.h" | 9 #include "athena/athena_export.h" |
10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 private: | 46 private: |
47 // Get the closest state from the last position. | 47 // Get the closest state from the last position. |
48 HomeCard::State GetClosestState() const; | 48 HomeCard::State GetClosestState() const; |
49 | 49 |
50 // Update the current position and emits OnGestureProgressed(). | 50 // Update the current position and emits OnGestureProgressed(). |
51 void UpdateScrollState(const ui::GestureEvent& event); | 51 void UpdateScrollState(const ui::GestureEvent& event); |
52 | 52 |
53 Delegate* delegate_; // Not owned. | 53 Delegate* delegate_; // Not owned. |
54 | 54 |
| 55 // The state when the gesture starts. |
| 56 HomeCard::State original_state_; |
| 57 |
55 // The offset from the top edge of the home card and the initial position of | 58 // The offset from the top edge of the home card and the initial position of |
56 // gesture. | 59 // gesture. |
57 int y_offset_; | 60 int y_offset_; |
58 | 61 |
59 // The estimated height of the home card after the last touch event. | 62 // The estimated height of the home card after the last touch event. |
60 int last_estimated_height_; | 63 int last_estimated_height_; |
61 | 64 |
62 // The bounds of the screen to compute the home card bounds. | 65 // The bounds of the screen to compute the home card bounds. |
63 gfx::Rect screen_bounds_; | 66 gfx::Rect screen_bounds_; |
64 | 67 |
65 DISALLOW_COPY_AND_ASSIGN(HomeCardGestureManager); | 68 DISALLOW_COPY_AND_ASSIGN(HomeCardGestureManager); |
66 }; | 69 }; |
67 | 70 |
68 } // namespace athena | 71 } // namespace athena |
69 | 72 |
70 #endif // ATHENA_HOME_HOME_CARD_GESTURE_MANAGER_H_ | 73 #endif // ATHENA_HOME_HOME_CARD_GESTURE_MANAGER_H_ |
OLD | NEW |