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 CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 bool OnOverscrollUpdate(float delta_x, float delta_y) override; | 35 bool OnOverscrollUpdate(float delta_x, float delta_y) override; |
36 void OnOverscrollComplete(OverscrollMode overscroll_mode) override; | 36 void OnOverscrollComplete(OverscrollMode overscroll_mode) override; |
37 void OnOverscrollModeChange(OverscrollMode old_mode, | 37 void OnOverscrollModeChange(OverscrollMode old_mode, |
38 OverscrollMode new_mode, | 38 OverscrollMode new_mode, |
39 OverscrollSource source) override; | 39 OverscrollSource source) override; |
40 base::Optional<float> GetMaxOverscrollDelta() const override; | 40 base::Optional<float> GetMaxOverscrollDelta() const override; |
41 | 41 |
42 WebContentsImpl* web_contents_; | 42 WebContentsImpl* web_contents_; |
43 std::unique_ptr<Affordance> affordance_; | 43 std::unique_ptr<Affordance> affordance_; |
44 float completion_threshold_; | 44 float completion_threshold_; |
| 45 OverscrollSource source_ = OverscrollSource::NONE; |
45 | 46 |
46 // When an overscroll is active, represents the maximum overscroll delta we | 47 // When an overscroll is active, represents the maximum overscroll delta we |
47 // expect in OnOverscrollUpdate(). | 48 // expect in OnOverscrollUpdate(). |
48 float max_delta_; | 49 float max_delta_; |
49 | 50 |
50 DISALLOW_COPY_AND_ASSIGN(GestureNavSimple); | 51 DISALLOW_COPY_AND_ASSIGN(GestureNavSimple); |
51 }; | 52 }; |
52 | 53 |
53 } // namespace content | 54 } // namespace content |
54 | 55 |
55 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_ | 56 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_GESTURE_NAV_SIMPLE_H_ |
OLD | NEW |