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

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

Issue 23801003: input: Make the OverscrollController less intrusive, and some code cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 months 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 | Annotate | Revision Log
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 const GestureEventWithLatencyInfo& gesture_event) OVERRIDE {} 165 const GestureEventWithLatencyInfo& gesture_event) OVERRIDE {}
166 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const OVERRIDE { 166 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const OVERRIDE {
167 NOTREACHED(); 167 NOTREACHED();
168 return NULL; 168 return NULL;
169 } 169 }
170 virtual bool ShouldForwardTouchEvent() const OVERRIDE { return true; } 170 virtual bool ShouldForwardTouchEvent() const OVERRIDE { return true; }
171 virtual bool ShouldForwardGestureEvent( 171 virtual bool ShouldForwardGestureEvent(
172 const GestureEventWithLatencyInfo& gesture_event) const OVERRIDE { 172 const GestureEventWithLatencyInfo& gesture_event) const OVERRIDE {
173 return true; 173 return true;
174 } 174 }
175 virtual bool HasQueuedGestureEvents() const OVERRIDE { return true; }
176 175
177 // IPC::Listener 176 // IPC::Listener
178 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { 177 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
179 message_received_ = true; 178 message_received_ = true;
180 return false; 179 return false;
181 } 180 }
182 181
183 bool send_event_called_; 182 bool send_event_called_;
184 bool sent_mouse_event_; 183 bool sent_mouse_event_;
185 bool sent_wheel_event_; 184 bool sent_wheel_event_;
(...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after
2570 2569
2571 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { 2570 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) {
2572 host_->SetupForInputRouterTest(); 2571 host_->SetupForInputRouterTest();
2573 2572
2574 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); 2573 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true));
2575 2574
2576 EXPECT_TRUE(host_->mock_input_router()->message_received_); 2575 EXPECT_TRUE(host_->mock_input_router()->message_received_);
2577 } 2576 }
2578 2577
2579 } // namespace content 2578 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698