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

Side by Side Diff: content/browser/android/overscroll_controller_android.h

Issue 2528823002: Separate SwipeRefreshHandler and ContentViewCore (Closed)
Patch Set: Fix compile error in test case Created 4 years 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
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 CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_
6 #define CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ 6 #define CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 19 matching lines...) Expand all
30 30
31 namespace content { 31 namespace content {
32 32
33 class ContentViewCoreImpl; 33 class ContentViewCoreImpl;
34 34
35 // Glue class for handling all inputs into Android-specific overscroll effects, 35 // Glue class for handling all inputs into Android-specific overscroll effects,
36 // both the passive overscroll glow and the active overscroll pull-to-refresh. 36 // both the passive overscroll glow and the active overscroll pull-to-refresh.
37 // Note that all input coordinates (both for events and overscroll) are in DIPs. 37 // Note that all input coordinates (both for events and overscroll) are in DIPs.
38 class OverscrollControllerAndroid : public ui::OverscrollGlowClient { 38 class OverscrollControllerAndroid : public ui::OverscrollGlowClient {
39 public: 39 public:
40 explicit OverscrollControllerAndroid(ContentViewCoreImpl* content_view_core, 40 explicit OverscrollControllerAndroid(
41 float dpi_scale); 41 ContentViewCoreImpl* content_view_core,
42 ui::OverscrollRefreshHandler* overscroll_refresh_handler,
43 float dpi_scale);
42 ~OverscrollControllerAndroid() override; 44 ~OverscrollControllerAndroid() override;
43 45
44 // Returns true if |event| is consumed by an overscroll effect, in which 46 // Returns true if |event| is consumed by an overscroll effect, in which
45 // case it should cease propagation. 47 // case it should cease propagation.
46 bool WillHandleGestureEvent(const blink::WebGestureEvent& event); 48 bool WillHandleGestureEvent(const blink::WebGestureEvent& event);
47 49
48 // To be called upon receipt of a gesture event ack. 50 // To be called upon receipt of a gesture event ack.
49 void OnGestureEventAck(const blink::WebGestureEvent& event, 51 void OnGestureEventAck(const blink::WebGestureEvent& event,
50 InputEventAckState ack_result); 52 InputEventAckState ack_result);
51 53
(...skipping 26 matching lines...) Expand all
78 // TODO(jdduke): Factor out a common API from the two overscroll effects. 80 // TODO(jdduke): Factor out a common API from the two overscroll effects.
79 std::unique_ptr<ui::OverscrollGlow> glow_effect_; 81 std::unique_ptr<ui::OverscrollGlow> glow_effect_;
80 std::unique_ptr<ui::OverscrollRefresh> refresh_effect_; 82 std::unique_ptr<ui::OverscrollRefresh> refresh_effect_;
81 83
82 DISALLOW_COPY_AND_ASSIGN(OverscrollControllerAndroid); 84 DISALLOW_COPY_AND_ASSIGN(OverscrollControllerAndroid);
83 }; 85 };
84 86
85 } // namespace content 87 } // namespace content
86 88
87 #endif // CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_ 89 #endif // CONTENT_BROWSER_ANDROID_OVERSCROLL_CONTROLLER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698