Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(634)

Side by Side Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 48973005: Move TouchEvent timeout code to the TouchEventQueue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 const TouchEventWithLatencyInfo& touch_event) OVERRIDE { 159 const TouchEventWithLatencyInfo& touch_event) OVERRIDE {
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 170
170 // IPC::Listener 171 // IPC::Listener
171 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { 172 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
172 message_received_ = true; 173 message_received_ = true;
173 return false; 174 return false;
174 } 175 }
175 176
176 bool flush_called_; 177 bool flush_called_;
177 bool send_event_called_; 178 bool send_event_called_;
178 bool sent_mouse_event_; 179 bool sent_mouse_event_;
(...skipping 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2497 2498
2498 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { 2499 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) {
2499 host_->SetupForInputRouterTest(); 2500 host_->SetupForInputRouterTest();
2500 2501
2501 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); 2502 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true));
2502 2503
2503 EXPECT_TRUE(host_->mock_input_router()->message_received_); 2504 EXPECT_TRUE(host_->mock_input_router()->message_received_);
2504 } 2505 }
2505 2506
2506 } // namespace content 2507 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698