| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 BLIMP_CLIENT_CORE_INPUT_BLIMP_INPUT_HANDLER_WRAPPER_H_ | 5 #ifndef BLIMP_CLIENT_CORE_INPUT_BLIMP_INPUT_HANDLER_WRAPPER_H_ |
| 6 #define BLIMP_CLIENT_CORE_INPUT_BLIMP_INPUT_HANDLER_WRAPPER_H_ | 6 #define BLIMP_CLIENT_CORE_INPUT_BLIMP_INPUT_HANDLER_WRAPPER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 ui::ScopedWebInputEvent event, | 58 ui::ScopedWebInputEvent event, |
| 59 const ui::LatencyInfo& latency_info) override; | 59 const ui::LatencyInfo& latency_info) override; |
| 60 blink::WebGestureCurve* CreateFlingAnimationCurve( | 60 blink::WebGestureCurve* CreateFlingAnimationCurve( |
| 61 blink::WebGestureDevice device_source, | 61 blink::WebGestureDevice device_source, |
| 62 const blink::WebFloatPoint& velocity, | 62 const blink::WebFloatPoint& velocity, |
| 63 const blink::WebSize& cumulative_scroll) override; | 63 const blink::WebSize& cumulative_scroll) override; |
| 64 void DidOverscroll(const gfx::Vector2dF& accumulated_overscroll, | 64 void DidOverscroll(const gfx::Vector2dF& accumulated_overscroll, |
| 65 const gfx::Vector2dF& latest_overscroll_delta, | 65 const gfx::Vector2dF& latest_overscroll_delta, |
| 66 const gfx::Vector2dF& current_fling_velocity, | 66 const gfx::Vector2dF& current_fling_velocity, |
| 67 const gfx::PointF& causal_event_viewport_point) override; | 67 const gfx::PointF& causal_event_viewport_point) override; |
| 68 void DidStartFlinging() override; | |
| 69 void DidStopFlinging() override; | 68 void DidStopFlinging() override; |
| 70 void DidAnimateForInput() override; | 69 void DidAnimateForInput() override; |
| 71 | 70 |
| 72 base::ThreadChecker compositor_thread_checker_; | 71 base::ThreadChecker compositor_thread_checker_; |
| 73 | 72 |
| 74 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 73 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 75 | 74 |
| 76 // Used to queue calls to the BlimpInputManager to be run on the main | 75 // Used to queue calls to the BlimpInputManager to be run on the main |
| 77 // thread. This ensures that any tasks queued are abandoned after the | 76 // thread. This ensures that any tasks queued are abandoned after the |
| 78 // BlimpInputManager is destroyed. | 77 // BlimpInputManager is destroyed. |
| 79 base::WeakPtr<BlimpInputManager> input_manager_weak_ptr_; | 78 base::WeakPtr<BlimpInputManager> input_manager_weak_ptr_; |
| 80 | 79 |
| 81 std::unique_ptr<ui::InputHandlerProxy> input_handler_proxy_; | 80 std::unique_ptr<ui::InputHandlerProxy> input_handler_proxy_; |
| 82 | 81 |
| 83 // Used to dispense weak ptrs to post tasks to the wrapper on the compositor | 82 // Used to dispense weak ptrs to post tasks to the wrapper on the compositor |
| 84 // thread. The weak ptrs created using this factory will be invalidated in | 83 // thread. The weak ptrs created using this factory will be invalidated in |
| 85 // WillShutdown. This method is called on the compositor thread when the | 84 // WillShutdown. This method is called on the compositor thread when the |
| 86 // InputHandlerProxy is being terminated. The wrapper does not need to be used | 85 // InputHandlerProxy is being terminated. The wrapper does not need to be used |
| 87 // beyond this point. | 86 // beyond this point. |
| 88 base::WeakPtrFactory<BlimpInputHandlerWrapper> weak_factory_; | 87 base::WeakPtrFactory<BlimpInputHandlerWrapper> weak_factory_; |
| 89 | 88 |
| 90 DISALLOW_COPY_AND_ASSIGN(BlimpInputHandlerWrapper); | 89 DISALLOW_COPY_AND_ASSIGN(BlimpInputHandlerWrapper); |
| 91 }; | 90 }; |
| 92 | 91 |
| 93 } // namespace client | 92 } // namespace client |
| 94 } // namespace blimp | 93 } // namespace blimp |
| 95 | 94 |
| 96 #endif // BLIMP_CLIENT_CORE_INPUT_BLIMP_INPUT_HANDLER_WRAPPER_H_ | 95 #endif // BLIMP_CLIENT_CORE_INPUT_BLIMP_INPUT_HANDLER_WRAPPER_H_ |
| OLD | NEW |