| OLD | NEW |
| 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_MANAGER_H_ | 5 #ifndef CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ |
| 6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ | 6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/containers/scoped_ptr_hash_map.h" | 8 #include "base/containers/scoped_ptr_hash_map.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void ObserveWheelEventAndResultOnMainThread( | 62 void ObserveWheelEventAndResultOnMainThread( |
| 63 int routing_id, | 63 int routing_id, |
| 64 const blink::WebMouseWheelEvent& wheel_event, | 64 const blink::WebMouseWheelEvent& wheel_event, |
| 65 const cc::InputHandlerScrollResult& scroll_result); | 65 const cc::InputHandlerScrollResult& scroll_result); |
| 66 | 66 |
| 67 void ObserveGestureEventAndResultOnMainThread( | 67 void ObserveGestureEventAndResultOnMainThread( |
| 68 int routing_id, | 68 int routing_id, |
| 69 const blink::WebGestureEvent& gesture_event, | 69 const blink::WebGestureEvent& gesture_event, |
| 70 const cc::InputHandlerScrollResult& scroll_result); | 70 const cc::InputHandlerScrollResult& scroll_result); |
| 71 | 71 |
| 72 void NonBlockingInputEventHandledOnMainThread(int routing_id, | 72 void NotifyInputEventHandledOnMainThread(int routing_id, |
| 73 blink::WebInputEvent::Type); | 73 blink::WebInputEvent::Type); |
| 74 | 74 |
| 75 // Callback only from the compositor's thread. | 75 // Callback only from the compositor's thread. |
| 76 void RemoveInputHandler(int routing_id); | 76 void RemoveInputHandler(int routing_id); |
| 77 | 77 |
| 78 // Called from the compositor's thread. | 78 // Called from the compositor's thread. |
| 79 virtual InputEventAckState HandleInputEvent( | 79 virtual InputEventAckState HandleInputEvent( |
| 80 int routing_id, | 80 int routing_id, |
| 81 const blink::WebInputEvent* input_event, | 81 const blink::WebInputEvent* input_event, |
| 82 ui::LatencyInfo* latency_info); | 82 ui::LatencyInfo* latency_info); |
| 83 | 83 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 103 void ObserveWheelEventAndResultOnCompositorThread( | 103 void ObserveWheelEventAndResultOnCompositorThread( |
| 104 int routing_id, | 104 int routing_id, |
| 105 const blink::WebMouseWheelEvent& wheel_event, | 105 const blink::WebMouseWheelEvent& wheel_event, |
| 106 const cc::InputHandlerScrollResult& scroll_result); | 106 const cc::InputHandlerScrollResult& scroll_result); |
| 107 | 107 |
| 108 void ObserveGestureEventAndResultOnCompositorThread( | 108 void ObserveGestureEventAndResultOnCompositorThread( |
| 109 int routing_id, | 109 int routing_id, |
| 110 const blink::WebGestureEvent& gesture_event, | 110 const blink::WebGestureEvent& gesture_event, |
| 111 const cc::InputHandlerScrollResult& scroll_result); | 111 const cc::InputHandlerScrollResult& scroll_result); |
| 112 | 112 |
| 113 void NonBlockingInputEventHandledOnCompositorThread( | 113 void NotifyInputEventHandledOnCompositorThread(int routing_id, |
| 114 int routing_id, | 114 blink::WebInputEvent::Type); |
| 115 blink::WebInputEvent::Type); | |
| 116 | 115 |
| 117 typedef base::ScopedPtrHashMap<int, // routing_id | 116 typedef base::ScopedPtrHashMap<int, // routing_id |
| 118 scoped_ptr<InputHandlerWrapper>> | 117 scoped_ptr<InputHandlerWrapper>> |
| 119 InputHandlerMap; | 118 InputHandlerMap; |
| 120 InputHandlerMap input_handlers_; | 119 InputHandlerMap input_handlers_; |
| 121 | 120 |
| 122 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 121 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 123 InputHandlerManagerClient* const client_; | 122 InputHandlerManagerClient* const client_; |
| 124 // May be null. | 123 // May be null. |
| 125 SynchronousInputHandlerProxyClient* const synchronous_handler_proxy_client_; | 124 SynchronousInputHandlerProxyClient* const synchronous_handler_proxy_client_; |
| 126 scheduler::RendererScheduler* const renderer_scheduler_; // Not owned. | 125 scheduler::RendererScheduler* const renderer_scheduler_; // Not owned. |
| 127 }; | 126 }; |
| 128 | 127 |
| 129 } // namespace content | 128 } // namespace content |
| 130 | 129 |
| 131 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ | 130 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ |
| OLD | NEW |