| Index: content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
|
| diff --git a/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc b/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
|
| index 69eaf9b00f3ce667aa6c6719d66c788671a8f31a..6be46f38cd83ec82a0fba4abb9e1e0a093e41292 100644
|
| --- a/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
|
| +++ b/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
|
| @@ -47,10 +47,10 @@ class MockSyntheticGesture : public SyntheticGesture {
|
| step_count_(0) {
|
| *finished_ = false;
|
| }
|
| - virtual ~MockSyntheticGesture() {}
|
| + ~MockSyntheticGesture() override {}
|
|
|
| - virtual Result ForwardInputEvents(const base::TimeTicks& timestamp,
|
| - SyntheticGestureTarget* target) override {
|
| + Result ForwardInputEvents(const base::TimeTicks& timestamp,
|
| + SyntheticGestureTarget* target) override {
|
| step_count_++;
|
| if (step_count_ == num_steps_) {
|
| *finished_ = true;
|
| @@ -75,22 +75,19 @@ class MockSyntheticGestureTarget : public SyntheticGestureTarget {
|
| MockSyntheticGestureTarget()
|
| : flush_requested_(false),
|
| pointer_assumed_stopped_time_ms_(kPointerAssumedStoppedTimeMs) {}
|
| - virtual ~MockSyntheticGestureTarget() {}
|
| + ~MockSyntheticGestureTarget() override {}
|
|
|
| // SyntheticGestureTarget:
|
| - virtual void DispatchInputEventToPlatform(
|
| - const WebInputEvent& event) override {}
|
| + void DispatchInputEventToPlatform(const WebInputEvent& event) override {}
|
|
|
| - virtual void SetNeedsFlush() override {
|
| - flush_requested_ = true;
|
| - }
|
| + void SetNeedsFlush() override { flush_requested_ = true; }
|
|
|
| - virtual SyntheticGestureParams::GestureSourceType
|
| + SyntheticGestureParams::GestureSourceType
|
| GetDefaultSyntheticGestureSourceType() const override {
|
| return SyntheticGestureParams::TOUCH_INPUT;
|
| }
|
|
|
| - virtual base::TimeDelta PointerAssumedStoppedTime() const override {
|
| + base::TimeDelta PointerAssumedStoppedTime() const override {
|
| return base::TimeDelta::FromMilliseconds(pointer_assumed_stopped_time_ms_);
|
| }
|
|
|
| @@ -98,11 +95,9 @@ class MockSyntheticGestureTarget : public SyntheticGestureTarget {
|
| pointer_assumed_stopped_time_ms_ = time_ms;
|
| }
|
|
|
| - virtual float GetTouchSlopInDips() const override {
|
| - return kTouchSlopInDips;
|
| - }
|
| + float GetTouchSlopInDips() const override { return kTouchSlopInDips; }
|
|
|
| - virtual float GetMinScalingSpanInDips() const override {
|
| + float GetMinScalingSpanInDips() const override {
|
| return kMinScalingSpanInDips;
|
| }
|
|
|
| @@ -118,7 +113,7 @@ class MockSyntheticGestureTarget : public SyntheticGestureTarget {
|
| class MockScrollGestureTarget : public MockSyntheticGestureTarget {
|
| public:
|
| MockScrollGestureTarget() : total_abs_scroll_distance_length_(0) {}
|
| - virtual ~MockScrollGestureTarget() {}
|
| + ~MockScrollGestureTarget() override {}
|
|
|
| gfx::Vector2dF start_to_end_distance() const {
|
| return start_to_end_distance_;
|
| @@ -135,10 +130,9 @@ class MockScrollGestureTarget : public MockSyntheticGestureTarget {
|
| class MockScrollMouseTarget : public MockScrollGestureTarget {
|
| public:
|
| MockScrollMouseTarget() {}
|
| - virtual ~MockScrollMouseTarget() {}
|
| + ~MockScrollMouseTarget() override {}
|
|
|
| - virtual void DispatchInputEventToPlatform(
|
| - const WebInputEvent& event) override {
|
| + void DispatchInputEventToPlatform(const WebInputEvent& event) override {
|
| ASSERT_EQ(event.type, WebInputEvent::MouseWheel);
|
| const WebMouseWheelEvent& mouse_wheel_event =
|
| static_cast<const WebMouseWheelEvent&>(event);
|
| @@ -151,10 +145,9 @@ class MockScrollMouseTarget : public MockScrollGestureTarget {
|
| class MockScrollTouchTarget : public MockScrollGestureTarget {
|
| public:
|
| MockScrollTouchTarget() : started_(false) {}
|
| - virtual ~MockScrollTouchTarget() {}
|
| + ~MockScrollTouchTarget() override {}
|
|
|
| - virtual void DispatchInputEventToPlatform(
|
| - const WebInputEvent& event) override {
|
| + void DispatchInputEventToPlatform(const WebInputEvent& event) override {
|
| ASSERT_TRUE(WebInputEvent::isTouchEventType(event.type));
|
| const WebTouchEvent& touch_event = static_cast<const WebTouchEvent&>(event);
|
| ASSERT_EQ(touch_event.touchesLength, 1U);
|
| @@ -200,10 +193,9 @@ class MockSyntheticPinchTouchTarget : public MockSyntheticGestureTarget {
|
| last_pointer_distance_(0),
|
| zoom_direction_(ZOOM_DIRECTION_UNKNOWN),
|
| started_(false) {}
|
| - virtual ~MockSyntheticPinchTouchTarget() {}
|
| + ~MockSyntheticPinchTouchTarget() override {}
|
|
|
| - virtual void DispatchInputEventToPlatform(
|
| - const WebInputEvent& event) override {
|
| + void DispatchInputEventToPlatform(const WebInputEvent& event) override {
|
| ASSERT_TRUE(WebInputEvent::isTouchEventType(event.type));
|
| const WebTouchEvent& touch_event = static_cast<const WebTouchEvent&>(event);
|
| ASSERT_EQ(touch_event.touchesLength, 2U);
|
| @@ -278,7 +270,7 @@ class MockSyntheticPinchTouchTarget : public MockSyntheticGestureTarget {
|
| class MockSyntheticTapGestureTarget : public MockSyntheticGestureTarget {
|
| public:
|
| MockSyntheticTapGestureTarget() : state_(NOT_STARTED) {}
|
| - virtual ~MockSyntheticTapGestureTarget() {}
|
| + ~MockSyntheticTapGestureTarget() override {}
|
|
|
| bool GestureFinished() const { return state_ == FINISHED; }
|
| gfx::PointF position() const { return position_; }
|
| @@ -300,10 +292,9 @@ class MockSyntheticTapGestureTarget : public MockSyntheticGestureTarget {
|
| class MockSyntheticTapTouchTarget : public MockSyntheticTapGestureTarget {
|
| public:
|
| MockSyntheticTapTouchTarget() {}
|
| - virtual ~MockSyntheticTapTouchTarget() {}
|
| + ~MockSyntheticTapTouchTarget() override {}
|
|
|
| - virtual void DispatchInputEventToPlatform(
|
| - const WebInputEvent& event) override {
|
| + void DispatchInputEventToPlatform(const WebInputEvent& event) override {
|
| ASSERT_TRUE(WebInputEvent::isTouchEventType(event.type));
|
| const WebTouchEvent& touch_event = static_cast<const WebTouchEvent&>(event);
|
| ASSERT_EQ(touch_event.touchesLength, 1U);
|
| @@ -333,10 +324,9 @@ class MockSyntheticTapTouchTarget : public MockSyntheticTapGestureTarget {
|
| class MockSyntheticTapMouseTarget : public MockSyntheticTapGestureTarget {
|
| public:
|
| MockSyntheticTapMouseTarget() {}
|
| - virtual ~MockSyntheticTapMouseTarget() {}
|
| + ~MockSyntheticTapMouseTarget() override {}
|
|
|
| - virtual void DispatchInputEventToPlatform(
|
| - const WebInputEvent& event) override {
|
| + void DispatchInputEventToPlatform(const WebInputEvent& event) override {
|
| ASSERT_TRUE(WebInputEvent::isMouseEventType(event.type));
|
| const WebMouseEvent& mouse_event = static_cast<const WebMouseEvent&>(event);
|
|
|
|
|