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

Side by Side Diff: content/renderer/gpu/input_handler_wrapper.h

Issue 13844021: Move compositor thread input handling logic into content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 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.
4
5 #ifndef CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_
6 #define CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h"
10 #include "content/renderer/gpu/input_handler_manager.h"
11 #include "content/renderer/gpu/input_handler_proxy.h"
12 #include "content/renderer/gpu/input_handler_proxy_client.h"
13
14 namespace content {
15
16 // This class lives on the compositor thread.
17 class InputHandlerWrapper
18 : public InputHandlerProxyClient,
19 public base::RefCountedThreadSafe<InputHandlerWrapper> {
20 public:
21 InputHandlerWrapper(InputHandlerManager* input_handler_manager,
22 int routing_id,
23 const scoped_refptr<base::MessageLoopProxy>& main_loop,
24 const base::WeakPtr<cc::InputHandler>& input_handler,
25 const base::WeakPtr<RenderViewImpl>& render_view_impl);
26
27 int routing_id() const { return routing_id_; }
28 InputHandlerProxy* input_handler_proxy() { return &input_handler_proxy_; }
29
30 // InputHandlerProxyClient implementation.
31 virtual void WillShutdown() OVERRIDE;
32 virtual void DidHandleInputEvent() OVERRIDE;
33 virtual void DidNotHandleInputEvent(bool send_to_widget) OVERRIDE;
34 virtual void TransferActiveWheelFlingAnimation(
35 const WebKit::WebActiveWheelFlingParameters& params) OVERRIDE;
36 virtual WebKit::WebGestureCurve* CreateFlingAnimationCurve(
37 int deviceSource,
38 const WebKit::WebFloatPoint& velocity,
39 const WebKit::WebSize& cumulativeScroll) OVERRIDE;
40
41 private:
42 friend class base::RefCountedThreadSafe<InputHandlerWrapper>;
43
44 virtual ~InputHandlerWrapper();
45
46 InputHandlerManager* input_handler_manager_;
47 int routing_id_;
48 InputHandlerProxy input_handler_proxy_;
49 scoped_refptr<base::MessageLoopProxy> main_loop_;
50
51 // Can only be accessed on the main thread.
52 base::WeakPtr<RenderViewImpl> render_view_impl_;
53
54 DISALLOW_COPY_AND_ASSIGN(InputHandlerWrapper);
55 };
56
57 } // namespace content
58
59 #endif // CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_
OLDNEW
« no previous file with comments | « content/renderer/gpu/input_handler_proxy_unittest.cc ('k') | content/renderer/gpu/input_handler_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698