| 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 InputEventAckState HandleInputEvent(int routing_id, | 79 InputEventAckState HandleInputEvent(int routing_id, |
| 80 const blink::WebInputEvent* input_event, | 80 const blink::WebInputEvent* input_event, |
| 81 ui::LatencyInfo* latency_info); | 81 ui::LatencyInfo* latency_info); |
| 82 | 82 |
| 83 // Called from the compositor's thread. | 83 // Called from the compositor's thread. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 102 void ObserveWheelEventAndResultOnCompositorThread( | 102 void ObserveWheelEventAndResultOnCompositorThread( |
| 103 int routing_id, | 103 int routing_id, |
| 104 const blink::WebMouseWheelEvent& wheel_event, | 104 const blink::WebMouseWheelEvent& wheel_event, |
| 105 const cc::InputHandlerScrollResult& scroll_result); | 105 const cc::InputHandlerScrollResult& scroll_result); |
| 106 | 106 |
| 107 void ObserveGestureEventAndResultOnCompositorThread( | 107 void ObserveGestureEventAndResultOnCompositorThread( |
| 108 int routing_id, | 108 int routing_id, |
| 109 const blink::WebGestureEvent& gesture_event, | 109 const blink::WebGestureEvent& gesture_event, |
| 110 const cc::InputHandlerScrollResult& scroll_result); | 110 const cc::InputHandlerScrollResult& scroll_result); |
| 111 | 111 |
| 112 void NonBlockingInputEventHandledOnCompositorThread( | 112 void NotifyInputEventHandledOnCompositorThread(int routing_id, |
| 113 int routing_id, | 113 blink::WebInputEvent::Type); |
| 114 blink::WebInputEvent::Type); | |
| 115 | 114 |
| 116 typedef base::ScopedPtrHashMap<int, // routing_id | 115 typedef base::ScopedPtrHashMap<int, // routing_id |
| 117 scoped_ptr<InputHandlerWrapper>> | 116 scoped_ptr<InputHandlerWrapper>> |
| 118 InputHandlerMap; | 117 InputHandlerMap; |
| 119 InputHandlerMap input_handlers_; | 118 InputHandlerMap input_handlers_; |
| 120 | 119 |
| 121 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 120 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 122 InputHandlerManagerClient* const client_; | 121 InputHandlerManagerClient* const client_; |
| 123 // May be null. | 122 // May be null. |
| 124 SynchronousInputHandlerProxyClient* const synchronous_handler_proxy_client_; | 123 SynchronousInputHandlerProxyClient* const synchronous_handler_proxy_client_; |
| 125 scheduler::RendererScheduler* const renderer_scheduler_; // Not owned. | 124 scheduler::RendererScheduler* const renderer_scheduler_; // Not owned. |
| 126 }; | 125 }; |
| 127 | 126 |
| 128 } // namespace content | 127 } // namespace content |
| 129 | 128 |
| 130 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ | 129 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ |
| OLD | NEW |