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

Side by Side Diff: ui/events/blink/input_handler_proxy.h

Issue 1415953004: Move content/renderer input handling for web input events to ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move code to ui Created 5 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_INPUT_HANDLER_PROXY_H_ 5 #ifndef UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_
6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_H_ 6 #define UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "cc/input/input_handler.h" 11 #include "cc/input/input_handler.h"
12 #include "content/common/content_export.h"
13 #include "content/renderer/input/synchronous_input_handler_proxy.h"
14 #include "third_party/WebKit/public/platform/WebGestureCurve.h" 12 #include "third_party/WebKit/public/platform/WebGestureCurve.h"
15 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" 13 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h"
16 #include "third_party/WebKit/public/web/WebActiveWheelFlingParameters.h" 14 #include "third_party/WebKit/public/web/WebActiveWheelFlingParameters.h"
17 #include "third_party/WebKit/public/web/WebInputEvent.h" 15 #include "third_party/WebKit/public/web/WebInputEvent.h"
16 #include "ui/events/blink/input_scroll_elasticity_controller.h"
17 #include "ui/events/blink/synchronous_input_handler_proxy.h"
18 18
19 namespace content { 19 namespace ui {
20 20
21 namespace test { 21 namespace test {
22 class InputHandlerProxyTest; 22 class InputHandlerProxyTest;
23 } 23 }
24 24
25 class InputHandlerProxyClient; 25 class InputHandlerProxyClient;
26 class InputScrollElasticityController; 26 class InputScrollElasticityController;
27 class SynchronousInputHandler;
28 class SynchronousInputHandlerProxy;
27 29
28 // This class is a proxy between the content input event filtering and the 30 // This class is a proxy between the blink web input events for a WebWidget and
29 // compositor's input handling logic. InputHandlerProxy instances live entirely 31 // the compositor's input handling logic. InputHandlerProxy instances live
30 // on the compositor thread. Each InputHandler instance handles input events 32 // entirely on the compositor thread. Each InputHandler instance handles input
31 // intended for a specific WebWidget. 33 // events intended for a specific WebWidget.
32 class CONTENT_EXPORT InputHandlerProxy 34 class InputHandlerProxy
33 : public cc::InputHandlerClient, 35 : public cc::InputHandlerClient,
34 public SynchronousInputHandlerProxy, 36 public SynchronousInputHandlerProxy,
35 public NON_EXPORTED_BASE(blink::WebGestureCurveTarget) { 37 public NON_EXPORTED_BASE(blink::WebGestureCurveTarget) {
36 public: 38 public:
39
37 InputHandlerProxy(cc::InputHandler* input_handler, 40 InputHandlerProxy(cc::InputHandler* input_handler,
38 InputHandlerProxyClient* client); 41 InputHandlerProxyClient* client);
39 ~InputHandlerProxy() override; 42 ~InputHandlerProxy() override;
40 43
41 InputScrollElasticityController* scroll_elasticity_controller() { 44 InputScrollElasticityController* scroll_elasticity_controller() {
42 return scroll_elasticity_controller_.get(); 45 return scroll_elasticity_controller_.get();
43 } 46 }
44 47
48 void set_smooth_scroll_enabled(bool value) { smooth_scroll_enabled_ = value; }
49
45 enum EventDisposition { 50 enum EventDisposition {
46 DID_HANDLE, 51 DID_HANDLE,
47 DID_NOT_HANDLE, 52 DID_NOT_HANDLE,
48 DROP_EVENT 53 DROP_EVENT
49 }; 54 };
50 EventDisposition HandleInputEventWithLatencyInfo( 55 EventDisposition HandleInputEventWithLatencyInfo(
51 const blink::WebInputEvent& event, 56 const blink::WebInputEvent& event,
52 ui::LatencyInfo* latency_info); 57 ui::LatencyInfo* latency_info);
53 EventDisposition HandleInputEvent(const blink::WebInputEvent& event); 58 EventDisposition HandleInputEvent(const blink::WebInputEvent& event);
54 59
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 182
178 bool smooth_scroll_enabled_; 183 bool smooth_scroll_enabled_;
179 184
180 bool uma_latency_reporting_enabled_; 185 bool uma_latency_reporting_enabled_;
181 186
182 base::TimeTicks last_fling_animate_time_; 187 base::TimeTicks last_fling_animate_time_;
183 188
184 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy); 189 DISALLOW_COPY_AND_ASSIGN(InputHandlerProxy);
185 }; 190 };
186 191
187 } // namespace content 192 } // namespace ui
188 193
189 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_H_ 194 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698