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

Side by Side Diff: content/renderer/input/input_handler_wrapper.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: Rebase. Created 5 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 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_WRAPPER_H_ 5 #ifndef CONTENT_RENDERER_INPUT_INPUT_HANDLER_WRAPPER_H_
6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_WRAPPER_H_ 6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_WRAPPER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "content/renderer/input/input_handler_manager.h" 10 #include "content/renderer/input/input_handler_manager.h"
11 #include "content/renderer/input/input_handler_proxy.h" 11 #include "ui/events/blink/input_handler_proxy.h"
12 #include "content/renderer/input/input_handler_proxy_client.h" 12 #include "ui/events/blink/input_handler_proxy_client.h"
13
14 namespace ui {
15 class InputHandlerProxy;
16 class InputHandlerProxyClient;
17 }
13 18
14 namespace content { 19 namespace content {
15 20
16 // This class lives on the compositor thread. 21 // This class lives on the compositor thread.
17 class InputHandlerWrapper : public InputHandlerProxyClient { 22 class InputHandlerWrapper : public ui::InputHandlerProxyClient {
18 public: 23 public:
19 InputHandlerWrapper( 24 InputHandlerWrapper(
20 InputHandlerManager* input_handler_manager, 25 InputHandlerManager* input_handler_manager,
21 int routing_id, 26 int routing_id,
22 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner, 27 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner,
23 const base::WeakPtr<cc::InputHandler>& input_handler, 28 const base::WeakPtr<cc::InputHandler>& input_handler,
24 const base::WeakPtr<RenderViewImpl>& render_view_impl); 29 const base::WeakPtr<RenderViewImpl>& render_view_impl);
25 ~InputHandlerWrapper() override; 30 ~InputHandlerWrapper() override;
26 31
27 int routing_id() const { return routing_id_; } 32 int routing_id() const { return routing_id_; }
28 InputHandlerProxy* input_handler_proxy() { return &input_handler_proxy_; } 33 ui::InputHandlerProxy* input_handler_proxy() {
34 return &input_handler_proxy_;
35 }
29 36
30 // InputHandlerProxyClient implementation. 37 // InputHandlerProxyClient implementation.
31 void WillShutdown() override; 38 void WillShutdown() override;
32 void TransferActiveWheelFlingAnimation( 39 void TransferActiveWheelFlingAnimation(
33 const blink::WebActiveWheelFlingParameters& params) override; 40 const blink::WebActiveWheelFlingParameters& params) override;
34 blink::WebGestureCurve* CreateFlingAnimationCurve( 41 blink::WebGestureCurve* CreateFlingAnimationCurve(
35 blink::WebGestureDevice deviceSource, 42 blink::WebGestureDevice deviceSource,
36 const blink::WebFloatPoint& velocity, 43 const blink::WebFloatPoint& velocity,
37 const blink::WebSize& cumulativeScroll) override; 44 const blink::WebSize& cumulativeScroll) override;
38 void DidOverscroll(const DidOverscrollParams& params) override; 45 void DidOverscroll(
46 const gfx::Vector2dF& accumulated_overscroll,
47 const gfx::Vector2dF& latest_overscroll_delta,
48 const gfx::Vector2dF& current_fling_velocity,
49 const gfx::PointF& causal_event_viewport_point) override;
39 void DidStopFlinging() override; 50 void DidStopFlinging() override;
40 void DidAnimateForInput() override; 51 void DidAnimateForInput() override;
41 52
42 private: 53 private:
43 InputHandlerManager* input_handler_manager_; 54 InputHandlerManager* input_handler_manager_;
44 int routing_id_; 55 int routing_id_;
45 InputHandlerProxy input_handler_proxy_; 56 ui::InputHandlerProxy input_handler_proxy_;
46 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 57 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
47 58
48 // Can only be accessed on the main thread. 59 // Can only be accessed on the main thread.
49 base::WeakPtr<RenderViewImpl> render_view_impl_; 60 base::WeakPtr<RenderViewImpl> render_view_impl_;
50 61
51 DISALLOW_COPY_AND_ASSIGN(InputHandlerWrapper); 62 DISALLOW_COPY_AND_ASSIGN(InputHandlerWrapper);
52 }; 63 };
53 64
54 } // namespace content 65 } // namespace content
55 66
56 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_WRAPPER_H_ 67 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_WRAPPER_H_
OLDNEW
« no previous file with comments | « content/renderer/input/input_handler_proxy_unittest.cc ('k') | content/renderer/input/input_handler_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698