OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/renderer/gpu/compositor_thread.h" | 5 #include "content/renderer/gpu/compositor_thread.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "content/renderer/gpu/input_event_filter.h" | 9 #include "content/renderer/gpu/input_event_filter.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebActiveWheelFlingPa
rameters.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebActiveWheelFlingPa
rameters.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 DCHECK_EQ(MessageLoop::current(), thread_.message_loop()); | 145 DCHECK_EQ(MessageLoop::current(), thread_.message_loop()); |
146 | 146 |
147 TRACE_EVENT0("CompositorThread::RemoveInputHandler", "RemovingRoute"); | 147 TRACE_EVENT0("CompositorThread::RemoveInputHandler", "RemovingRoute"); |
148 | 148 |
149 filter_->RemoveRoute(routing_id); | 149 filter_->RemoveRoute(routing_id); |
150 input_handlers_.erase(routing_id); | 150 input_handlers_.erase(routing_id); |
151 } | 151 } |
152 | 152 |
153 void CompositorThread::HandleInputEvent( | 153 void CompositorThread::HandleInputEvent( |
154 int routing_id, | 154 int routing_id, |
| 155 int64 input_number, |
155 const WebInputEvent* input_event) { | 156 const WebInputEvent* input_event) { |
156 DCHECK_EQ(MessageLoop::current(), thread_.message_loop()); | 157 DCHECK_EQ(MessageLoop::current(), thread_.message_loop()); |
157 | 158 |
158 InputHandlerMap::iterator it = input_handlers_.find(routing_id); | 159 InputHandlerMap::iterator it = input_handlers_.find(routing_id); |
159 if (it == input_handlers_.end()) { | 160 if (it == input_handlers_.end()) { |
160 TRACE_EVENT0("CompositorThread::HandleInputEvent", "NoInputHandlerFound"); | 161 TRACE_EVENT0("CompositorThread::HandleInputEvent", "NoInputHandlerFound"); |
161 // Oops, we no longer have an interested input handler.. | 162 // Oops, we no longer have an interested input handler.. |
162 filter_->DidNotHandleInputEvent(true); | 163 filter_->DidNotHandleInputEvent(true); |
163 return; | 164 return; |
164 } | 165 } |
165 | 166 |
166 it->second->input_handler()->handleInputEvent(*input_event); | 167 it->second->input_handler()->handleInputEvent(*input_event, input_number); |
167 } | 168 } |
168 | 169 |
169 } // namespace content | 170 } // namespace content |
OLD | NEW |