Fix a couple bugs in the settings_page_header wrt breadcrumbs.
[chromium-blink-merge.git] / content / renderer / input / input_handler_wrapper.h
blob5c925d0515bea1f713d9fc15e65c14896982f2f3
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_INPUT_INPUT_HANDLER_WRAPPER_H_
6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_WRAPPER_H_
8 #include "base/memory/weak_ptr.h"
9 #include "base/single_thread_task_runner.h"
10 #include "content/renderer/input/input_handler_manager.h"
11 #include "content/renderer/input/input_handler_proxy.h"
12 #include "content/renderer/input/input_handler_proxy_client.h"
14 namespace content {
16 // This class lives on the compositor thread.
17 class InputHandlerWrapper : public InputHandlerProxyClient {
18 public:
19 InputHandlerWrapper(
20 InputHandlerManager* input_handler_manager,
21 int routing_id,
22 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner,
23 const base::WeakPtr<cc::InputHandler>& input_handler,
24 const base::WeakPtr<RenderViewImpl>& render_view_impl);
25 ~InputHandlerWrapper() override;
27 int routing_id() const { return routing_id_; }
28 InputHandlerProxy* input_handler_proxy() { return &input_handler_proxy_; }
30 // InputHandlerProxyClient implementation.
31 void WillShutdown() override;
32 void TransferActiveWheelFlingAnimation(
33 const blink::WebActiveWheelFlingParameters& params) override;
34 blink::WebGestureCurve* CreateFlingAnimationCurve(
35 blink::WebGestureDevice deviceSource,
36 const blink::WebFloatPoint& velocity,
37 const blink::WebSize& cumulativeScroll) override;
38 void DidOverscroll(const DidOverscrollParams& params) override;
39 void DidStopFlinging() override;
40 void DidAnimateForInput() override;
42 private:
43 InputHandlerManager* input_handler_manager_;
44 int routing_id_;
45 InputHandlerProxy input_handler_proxy_;
46 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
48 // Can only be accessed on the main thread.
49 base::WeakPtr<RenderViewImpl> render_view_impl_;
51 DISALLOW_COPY_AND_ASSIGN(InputHandlerWrapper);
54 } // namespace content
56 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_WRAPPER_H_