OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_OVERSCROLL_WINDOW_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_WINDOW_DELEGATE_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_WINDOW_DELEGATE_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_WINDOW_DELEGATE_H_ |
7 | 7 |
8 #include "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "content/browser/renderer_host/overscroll_controller.h" | 10 #include "content/browser/renderer_host/overscroll_controller.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // Overridden from ui::EventHandler. | 43 // Overridden from ui::EventHandler. |
44 void OnKeyEvent(ui::KeyEvent* event) override; | 44 void OnKeyEvent(ui::KeyEvent* event) override; |
45 void OnMouseEvent(ui::MouseEvent* event) override; | 45 void OnMouseEvent(ui::MouseEvent* event) override; |
46 void OnScrollEvent(ui::ScrollEvent* event) override; | 46 void OnScrollEvent(ui::ScrollEvent* event) override; |
47 void OnGestureEvent(ui::GestureEvent* event) override; | 47 void OnGestureEvent(ui::GestureEvent* event) override; |
48 | 48 |
49 // Delegate to which we forward overscroll events. | 49 // Delegate to which we forward overscroll events. |
50 OverscrollControllerDelegate* delegate_; | 50 OverscrollControllerDelegate* delegate_; |
51 | 51 |
52 // The current overscroll mode. | 52 // The current overscroll mode. |
53 OverscrollMode overscroll_mode_; | 53 OverscrollMode overscroll_mode_ = OVERSCROLL_NONE; |
54 | 54 |
55 // The current overscroll source. | 55 // The current overscroll source. |
56 OverscrollSource overscroll_source_; | 56 OverscrollSource overscroll_source_ = OverscrollSource::NONE; |
57 | 57 |
58 // The latest delta_x scroll update. | 58 // The latest delta_x scroll update. |
59 float delta_x_; | 59 float delta_x_ = 0.f; |
60 | 60 |
61 // The ratio of overscroll at which we consider the overscroll completed. | 61 // The ratio of overscroll at which we consider the overscroll completed. |
62 const float complete_threshold_ratio_; | 62 const float complete_threshold_ratio_; |
63 | 63 |
64 // The threshold for starting the overscroll gesture, for touchscreen or | 64 // The threshold for starting the overscroll gesture, for touchscreen or |
65 // touchpads. | 65 // touchpads. |
66 const float start_threshold_touchscreen_; | 66 const float start_threshold_touchscreen_; |
67 const float start_threshold_touchpad_; | 67 const float start_threshold_touchpad_; |
68 | 68 |
69 // The threshold for starting the overscroll gesture for the current touch | 69 // The threshold for starting the overscroll gesture for the current touch |
70 // input. | 70 // input. |
71 float active_start_threshold_; | 71 float active_start_threshold_ = 0.f; |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(OverscrollWindowDelegate); | 73 DISALLOW_COPY_AND_ASSIGN(OverscrollWindowDelegate); |
74 }; | 74 }; |
75 | 75 |
76 } // namespace content | 76 } // namespace content |
77 | 77 |
78 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_WINDOW_DELEGATE_H_ | 78 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_OVERSCROLL_WINDOW_DELEGATE_H_ |
OLD | NEW |