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

Side by Side Diff: content/renderer/input/render_widget_input_handler.h

Issue 2884423003: Use scroll-boundary-behavior to control overscroll-refresh/glow on android. (Closed)
Patch Set: Rebase Created 3 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
OLDNEW
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_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ 5 #ifndef CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_
6 #define CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ 6 #define CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "content/common/input/input_event_ack.h" 12 #include "content/common/input/input_event_ack.h"
13 #include "content/common/input/input_event_dispatch_type.h" 13 #include "content/common/input/input_event_dispatch_type.h"
14 #include "content/renderer/input/main_thread_event_queue.h" 14 #include "content/renderer/input/main_thread_event_queue.h"
15 #include "third_party/WebKit/public/platform/WebCoalescedInputEvent.h" 15 #include "third_party/WebKit/public/platform/WebCoalescedInputEvent.h"
16 #include "ui/base/ui_base_types.h" 16 #include "ui/base/ui_base_types.h"
17 #include "ui/events/blink/did_overscroll_params.h" 17 #include "ui/events/blink/did_overscroll_params.h"
18 18
19 namespace blink { 19 namespace blink {
20 struct WebFloatPoint; 20 struct WebFloatPoint;
21 struct WebFloatSize; 21 struct WebFloatSize;
22 struct WebScrollBoundaryBehavior;
22 } 23 }
23 24
24 namespace ui { 25 namespace ui {
25 class LatencyInfo; 26 class LatencyInfo;
26 } 27 }
27 28
28 namespace content { 29 namespace content {
29 30
30 class RenderWidget; 31 class RenderWidget;
31 class RenderWidgetInputHandlerDelegate; 32 class RenderWidgetInputHandlerDelegate;
32 33
33 // RenderWidgetInputHandler is an IPC-agnostic input handling class. 34 // RenderWidgetInputHandler is an IPC-agnostic input handling class.
34 // IPC transport code should live in RenderWidget or RenderWidgetMusConnection. 35 // IPC transport code should live in RenderWidget or RenderWidgetMusConnection.
35 class CONTENT_EXPORT RenderWidgetInputHandler { 36 class CONTENT_EXPORT RenderWidgetInputHandler {
36 public: 37 public:
37 RenderWidgetInputHandler(RenderWidgetInputHandlerDelegate* delegate, 38 RenderWidgetInputHandler(RenderWidgetInputHandlerDelegate* delegate,
38 RenderWidget* widget); 39 RenderWidget* widget);
39 virtual ~RenderWidgetInputHandler(); 40 virtual ~RenderWidgetInputHandler();
40 41
41 // Handle input events from the input event provider. 42 // Handle input events from the input event provider.
42 virtual void HandleInputEvent( 43 virtual void HandleInputEvent(
43 const blink::WebCoalescedInputEvent& coalesced_event, 44 const blink::WebCoalescedInputEvent& coalesced_event,
44 const ui::LatencyInfo& latency_info, 45 const ui::LatencyInfo& latency_info,
45 HandledEventCallback callback); 46 HandledEventCallback callback);
46 47
47 // Handle overscroll from Blink. 48 // Handle overscroll from Blink.
48 void DidOverscrollFromBlink( 49 void DidOverscrollFromBlink(const blink::WebFloatSize& overscrollDelta,
49 const blink::WebFloatSize& overscrollDelta, 50 const blink::WebFloatSize& accumulatedOverscroll,
50 const blink::WebFloatSize& accumulatedOverscroll, 51 const blink::WebFloatPoint& position,
51 const blink::WebFloatPoint& position, 52 const blink::WebFloatSize& velocity,
52 const blink::WebFloatSize& velocity); 53 const blink::WebScrollBoundaryBehavior& behavior);
53 54
54 bool handling_input_event() const { return handling_input_event_; } 55 bool handling_input_event() const { return handling_input_event_; }
55 void set_handling_input_event(bool handling_input_event) { 56 void set_handling_input_event(bool handling_input_event) {
56 handling_input_event_ = handling_input_event; 57 handling_input_event_ = handling_input_event;
57 } 58 }
58 59
59 // Process the touch action, returning whether the action should be relayed 60 // Process the touch action, returning whether the action should be relayed
60 // to the browser. 61 // to the browser.
61 bool ProcessTouchAction(cc::TouchAction touch_action); 62 bool ProcessTouchAction(cc::TouchAction touch_action);
62 63
(...skipping 18 matching lines...) Expand all
81 82
82 // Indicates if the next sequence of Char events should be suppressed or not. 83 // Indicates if the next sequence of Char events should be suppressed or not.
83 bool suppress_next_char_events_; 84 bool suppress_next_char_events_;
84 85
85 DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler); 86 DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler);
86 }; 87 };
87 88
88 } // namespace content 89 } // namespace content
89 90
90 #endif // CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ 91 #endif // CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_
OLDNEW
« no previous file with comments | « content/renderer/input/input_handler_wrapper.cc ('k') | content/renderer/input/render_widget_input_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698