Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_client_impl.h" | |
| 11 #include "content/renderer/gpu/input_handler_client_impl_client.h" | |
| 12 #include "content/renderer/gpu/input_handler_manager.h" | |
| 13 | |
| 14 namespace content { | |
| 15 | |
| 16 class InputHandlerWrapper | |
|
danakj
2013/05/01 19:20:43
Hmm or is this the InputHandlerProxy. Or the Input
| |
| 17 : public InputHandlerClientImplClient, | |
| 18 public base::RefCountedThreadSafe<InputHandlerWrapper> { | |
| 19 public: | |
| 20 InputHandlerWrapper(InputHandlerManager* input_handler_manager, | |
| 21 int routing_id, | |
| 22 const scoped_refptr<base::MessageLoopProxy>& main_loop, | |
| 23 const base::WeakPtr<cc::InputHandler>& input_handler, | |
| 24 const base::WeakPtr<RenderViewImpl>& render_view_impl); | |
| 25 | |
| 26 int routing_id() const { return routing_id_; } | |
| 27 InputHandlerClientImpl* input_handler() const { return input_handler_.get(); } | |
| 28 | |
| 29 // InputHandlerClientImplClient implementation. | |
| 30 virtual void willShutdown() OVERRIDE; | |
| 31 virtual void didHandleInputEvent() OVERRIDE; | |
| 32 virtual void didNotHandleInputEvent(bool send_to_widget) OVERRIDE; | |
| 33 virtual void transferActiveWheelFlingAnimation( | |
| 34 const WebKit::WebActiveWheelFlingParameters& params) OVERRIDE; | |
| 35 virtual WebKit::WebGestureCurve* createFlingAnimationCurve( | |
| 36 int deviceSource, | |
| 37 const WebKit::WebFloatPoint& velocity, | |
| 38 const WebKit::WebSize& cumulativeScroll) OVERRIDE; | |
| 39 | |
| 40 private: | |
| 41 friend class base::RefCountedThreadSafe<InputHandlerWrapper>; | |
| 42 | |
| 43 virtual ~InputHandlerWrapper(); | |
| 44 | |
| 45 InputHandlerManager* input_handler_manager_; | |
| 46 int routing_id_; | |
| 47 scoped_ptr<InputHandlerClientImpl> input_handler_; | |
| 48 scoped_refptr<base::MessageLoopProxy> main_loop_; | |
| 49 | |
| 50 // Can only be accessed on the main thread. | |
| 51 base::WeakPtr<RenderViewImpl> render_view_impl_; | |
| 52 | |
| 53 DISALLOW_COPY_AND_ASSIGN(InputHandlerWrapper); | |
| 54 }; | |
| 55 | |
| 56 } // namespace content | |
| 57 | |
| 58 #endif // CONTENT_RENDERER_GPU_INPUT_HANDLER_WRAPPER_H_ | |
| OLD | NEW |