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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
10 #include "content/browser/browser_thread_impl.h" | 10 #include "content/browser/browser_thread_impl.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 send_touch_event_not_cancelled_ = | 160 send_touch_event_not_cancelled_ = |
161 client_->FilterInputEvent(touch_event.event, touch_event.latency) == | 161 client_->FilterInputEvent(touch_event.event, touch_event.latency) == |
162 INPUT_EVENT_ACK_STATE_NOT_CONSUMED; | 162 INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
163 } | 163 } |
164 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const OVERRIDE { | 164 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const OVERRIDE { |
165 NOTREACHED(); | 165 NOTREACHED(); |
166 return NULL; | 166 return NULL; |
167 } | 167 } |
168 virtual bool ShouldForwardTouchEvent() const OVERRIDE { return true; } | 168 virtual bool ShouldForwardTouchEvent() const OVERRIDE { return true; } |
169 virtual void OnViewUpdated(int view_flags) OVERRIDE {} | 169 virtual void OnViewUpdated(int view_flags) OVERRIDE {} |
| 170 virtual void DidStopFlinging() OVERRIDE {} |
170 | 171 |
171 // IPC::Listener | 172 // IPC::Listener |
172 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { | 173 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { |
173 message_received_ = true; | 174 message_received_ = true; |
174 return false; | 175 return false; |
175 } | 176 } |
176 | 177 |
177 bool flush_called_; | 178 bool flush_called_; |
178 bool send_event_called_; | 179 bool send_event_called_; |
179 bool sent_mouse_event_; | 180 bool sent_mouse_event_; |
(...skipping 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2498 | 2499 |
2499 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { | 2500 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { |
2500 host_->SetupForInputRouterTest(); | 2501 host_->SetupForInputRouterTest(); |
2501 | 2502 |
2502 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); | 2503 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); |
2503 | 2504 |
2504 EXPECT_TRUE(host_->mock_input_router()->message_received_); | 2505 EXPECT_TRUE(host_->mock_input_router()->message_received_); |
2505 } | 2506 } |
2506 | 2507 |
2507 } // namespace content | 2508 } // namespace content |
OLD | NEW |