| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "content/browser/renderer_host/input/input_ack_handler.h" | 7 #include "content/browser/renderer_host/input/input_ack_handler.h" |
| 8 #include "content/browser/renderer_host/input/input_router_client.h" | 8 #include "content/browser/renderer_host/input/input_router_client.h" |
| 9 #include "content/browser/renderer_host/input/input_router_impl.h" | 9 #include "content/browser/renderer_host/input/input_router_impl.h" |
| 10 #include "content/common/input/web_input_event_traits.h" | 10 #include "content/common/input/web_input_event_traits.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 int64 event_count_; | 190 int64 event_count_; |
| 191 base::TimeTicks start_; | 191 base::TimeTicks start_; |
| 192 DISALLOW_COPY_AND_ASSIGN(InputEventTimer); | 192 DISALLOW_COPY_AND_ASSIGN(InputEventTimer); |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 } // namespace | 195 } // namespace |
| 196 | 196 |
| 197 class InputRouterImplPerfTest : public testing::Test { | 197 class InputRouterImplPerfTest : public testing::Test { |
| 198 public: | 198 public: |
| 199 InputRouterImplPerfTest() : last_input_id_(0) {} | 199 InputRouterImplPerfTest() : last_input_id_(0) {} |
| 200 virtual ~InputRouterImplPerfTest() {} | 200 ~InputRouterImplPerfTest() override {} |
| 201 | 201 |
| 202 protected: | 202 protected: |
| 203 // testing::Test | 203 // testing::Test |
| 204 virtual void SetUp() override { | 204 void SetUp() override { |
| 205 sender_.reset(new NullIPCSender()); | 205 sender_.reset(new NullIPCSender()); |
| 206 client_.reset(new NullInputRouterClient()); | 206 client_.reset(new NullInputRouterClient()); |
| 207 ack_handler_.reset(new NullInputAckHandler()); | 207 ack_handler_.reset(new NullInputAckHandler()); |
| 208 input_router_.reset(new InputRouterImpl(sender_.get(), | 208 input_router_.reset(new InputRouterImpl(sender_.get(), |
| 209 client_.get(), | 209 client_.get(), |
| 210 ack_handler_.get(), | 210 ack_handler_.get(), |
| 211 MSG_ROUTING_NONE, | 211 MSG_ROUTING_NONE, |
| 212 InputRouterImpl::Config())); | 212 InputRouterImpl::Config())); |
| 213 } | 213 } |
| 214 | 214 |
| 215 virtual void TearDown() override { | 215 void TearDown() override { |
| 216 base::MessageLoop::current()->RunUntilIdle(); | 216 base::MessageLoop::current()->RunUntilIdle(); |
| 217 | 217 |
| 218 input_router_.reset(); | 218 input_router_.reset(); |
| 219 ack_handler_.reset(); | 219 ack_handler_.reset(); |
| 220 client_.reset(); | 220 client_.reset(); |
| 221 sender_.reset(); | 221 sender_.reset(); |
| 222 } | 222 } |
| 223 | 223 |
| 224 void SendEvent(const WebGestureEvent& gesture, | 224 void SendEvent(const WebGestureEvent& gesture, |
| 225 const ui::LatencyInfo& latency) { | 225 const ui::LatencyInfo& latency) { |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 378 |
| 379 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) { | 379 TEST_F(InputRouterImplPerfTest, TouchSwipeToGestureScroll) { |
| 380 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ", | 380 SimulateTouchAndScrollEventSequence("TouchSwipeToGestureScroll ", |
| 381 kDefaultSteps, | 381 kDefaultSteps, |
| 382 kDefaultOrigin, | 382 kDefaultOrigin, |
| 383 kDefaultDistance, | 383 kDefaultDistance, |
| 384 kDefaultIterations); | 384 kDefaultIterations); |
| 385 } | 385 } |
| 386 | 386 |
| 387 } // namespace content | 387 } // namespace content |
| OLD | NEW |