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

Side by Side Diff: athena/home/home_card_gesture_manager.h

Issue 582923002: Do not EASE_IN_OUT after fling, rather EASE_OUT. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 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 unified diff | Download patch
« no previous file with comments | « athena/home/athena_start_page_view.cc ('k') | athena/home/home_card_gesture_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 11
12 namespace ui { 12 namespace ui {
13 class GestureEvent; 13 class GestureEvent;
14 } 14 }
15 15
16 namespace athena { 16 namespace athena {
17 17
18 // Handles the touch gestures over the home card. 18 // Handles the touch gestures over the home card.
19 class ATHENA_EXPORT HomeCardGestureManager { 19 class ATHENA_EXPORT HomeCardGestureManager {
20 public: 20 public:
21 class Delegate { 21 class Delegate {
22 public: 22 public:
23 // Called when the gesture has ended. The state of the home card will 23 // Called when the gesture has ended. The state of the home card will
24 // end up with |final_state|. 24 // end up with |final_state|. |is_fling| is true only when the gesture has
25 virtual void OnGestureEnded(HomeCard::State final_state) = 0; 25 // ended with a fling action.
26 virtual void OnGestureEnded(HomeCard::State final_state,
27 bool is_fling) = 0;
26 28
27 // Called when the gesture position is updated so that |delegate| updates 29 // Called when the gesture position is updated so that |delegate| updates
28 // the visual. The arguments indicate that the gesture is switching between 30 // the visual. The arguments indicate that the gesture is switching between
29 // |from_state| and |to_state|, and that the level of progress is at 31 // |from_state| and |to_state|, and that the level of progress is at
30 // |progress|, which is in the range (0, 1]. The home card was previously 32 // |progress|, which is in the range (0, 1]. The home card was previously
31 // at either |from_state| or |to_state|. In particular, the home card may 33 // at either |from_state| or |to_state|. In particular, the home card may
32 // never have been at |from_state|. |from_state| is never equal to 34 // never have been at |from_state|. |from_state| is never equal to
33 // |to_state|. 35 // |to_state|.
34 virtual void OnGestureProgressed( 36 virtual void OnGestureProgressed(
35 HomeCard::State from_state, 37 HomeCard::State from_state,
(...skipping 28 matching lines...) Expand all
64 66
65 // The bounds of the screen to compute the home card bounds. 67 // The bounds of the screen to compute the home card bounds.
66 gfx::Rect screen_bounds_; 68 gfx::Rect screen_bounds_;
67 69
68 DISALLOW_COPY_AND_ASSIGN(HomeCardGestureManager); 70 DISALLOW_COPY_AND_ASSIGN(HomeCardGestureManager);
69 }; 71 };
70 72
71 } // namespace athena 73 } // namespace athena
72 74
73 #endif // ATHENA_HOME_HOME_CARD_GESTURE_MANAGER_H_ 75 #endif // ATHENA_HOME_HOME_CARD_GESTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « athena/home/athena_start_page_view.cc ('k') | athena/home/home_card_gesture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698