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

Side by Side Diff: content/renderer/input/input_handler_proxy_unittest.cc

Issue 633303002: Replace FINAL and OVERRIDE with their C++11 counterparts in content/renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/input/input_handler_proxy.h" 5 #include "content/renderer/input/input_handler_proxy.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/swap_promise_monitor.h" 9 #include "cc/base/swap_promise_monitor.h"
10 #include "content/common/input/did_overscroll_params.h" 10 #include "content/common/input/did_overscroll_params.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 MOCK_METHOD2(ScrollBy, 92 MOCK_METHOD2(ScrollBy,
93 bool(const gfx::Point& viewport_point, 93 bool(const gfx::Point& viewport_point,
94 const gfx::Vector2dF& scroll_delta)); 94 const gfx::Vector2dF& scroll_delta));
95 MOCK_METHOD2(ScrollVerticallyByPage, 95 MOCK_METHOD2(ScrollVerticallyByPage,
96 bool(const gfx::Point& viewport_point, 96 bool(const gfx::Point& viewport_point,
97 cc::ScrollDirection direction)); 97 cc::ScrollDirection direction));
98 MOCK_METHOD0(ScrollEnd, void()); 98 MOCK_METHOD0(ScrollEnd, void());
99 MOCK_METHOD0(FlingScrollBegin, cc::InputHandler::ScrollStatus()); 99 MOCK_METHOD0(FlingScrollBegin, cc::InputHandler::ScrollStatus());
100 100
101 virtual scoped_ptr<cc::SwapPromiseMonitor> 101 virtual scoped_ptr<cc::SwapPromiseMonitor>
102 CreateLatencyInfoSwapPromiseMonitor(ui::LatencyInfo* latency) OVERRIDE { 102 CreateLatencyInfoSwapPromiseMonitor(ui::LatencyInfo* latency) override {
103 return scoped_ptr<cc::SwapPromiseMonitor>(); 103 return scoped_ptr<cc::SwapPromiseMonitor>();
104 } 104 }
105 105
106 virtual void BindToClient(cc::InputHandlerClient* client) OVERRIDE {} 106 virtual void BindToClient(cc::InputHandlerClient* client) override {}
107 107
108 virtual void MouseMoveAt(const gfx::Point& mouse_position) OVERRIDE {} 108 virtual void MouseMoveAt(const gfx::Point& mouse_position) override {}
109 109
110 MOCK_METHOD2(IsCurrentlyScrollingLayerAt, 110 MOCK_METHOD2(IsCurrentlyScrollingLayerAt,
111 bool(const gfx::Point& point, 111 bool(const gfx::Point& point,
112 cc::InputHandler::ScrollInputType type)); 112 cc::InputHandler::ScrollInputType type));
113 113
114 MOCK_METHOD1(HaveTouchEventHandlersAt, bool(const gfx::Point& point)); 114 MOCK_METHOD1(HaveTouchEventHandlersAt, bool(const gfx::Point& point));
115 115
116 virtual void SetRootLayerScrollOffsetDelegate( 116 virtual void SetRootLayerScrollOffsetDelegate(
117 cc::LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) 117 cc::LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate)
118 OVERRIDE {} 118 override {}
119 119
120 virtual void OnRootLayerDelegatedScrollOffsetChanged() OVERRIDE {} 120 virtual void OnRootLayerDelegatedScrollOffsetChanged() override {}
121 121
122 DISALLOW_COPY_AND_ASSIGN(MockInputHandler); 122 DISALLOW_COPY_AND_ASSIGN(MockInputHandler);
123 }; 123 };
124 124
125 // A simple WebGestureCurve implementation that flings at a constant velocity 125 // A simple WebGestureCurve implementation that flings at a constant velocity
126 // indefinitely. 126 // indefinitely.
127 class FakeWebGestureCurve : public blink::WebGestureCurve { 127 class FakeWebGestureCurve : public blink::WebGestureCurve {
128 public: 128 public:
129 FakeWebGestureCurve(const blink::WebFloatSize& velocity, 129 FakeWebGestureCurve(const blink::WebFloatSize& velocity,
130 const blink::WebFloatSize& cumulative_scroll) 130 const blink::WebFloatSize& cumulative_scroll)
(...skipping 20 matching lines...) Expand all
151 151
152 DISALLOW_COPY_AND_ASSIGN(FakeWebGestureCurve); 152 DISALLOW_COPY_AND_ASSIGN(FakeWebGestureCurve);
153 }; 153 };
154 154
155 class MockInputHandlerProxyClient 155 class MockInputHandlerProxyClient
156 : public content::InputHandlerProxyClient { 156 : public content::InputHandlerProxyClient {
157 public: 157 public:
158 MockInputHandlerProxyClient() {} 158 MockInputHandlerProxyClient() {}
159 virtual ~MockInputHandlerProxyClient() {} 159 virtual ~MockInputHandlerProxyClient() {}
160 160
161 virtual void WillShutdown() OVERRIDE {} 161 virtual void WillShutdown() override {}
162 162
163 MOCK_METHOD1(TransferActiveWheelFlingAnimation, 163 MOCK_METHOD1(TransferActiveWheelFlingAnimation,
164 void(const WebActiveWheelFlingParameters&)); 164 void(const WebActiveWheelFlingParameters&));
165 165
166 virtual blink::WebGestureCurve* CreateFlingAnimationCurve( 166 virtual blink::WebGestureCurve* CreateFlingAnimationCurve(
167 WebGestureDevice deviceSource, 167 WebGestureDevice deviceSource,
168 const WebFloatPoint& velocity, 168 const WebFloatPoint& velocity,
169 const WebSize& cumulative_scroll) OVERRIDE { 169 const WebSize& cumulative_scroll) override {
170 return new FakeWebGestureCurve( 170 return new FakeWebGestureCurve(
171 blink::WebFloatSize(velocity.x, velocity.y), 171 blink::WebFloatSize(velocity.x, velocity.y),
172 blink::WebFloatSize(cumulative_scroll.width, cumulative_scroll.height)); 172 blink::WebFloatSize(cumulative_scroll.width, cumulative_scroll.height));
173 } 173 }
174 174
175 MOCK_METHOD1(DidOverscroll, void(const DidOverscrollParams&)); 175 MOCK_METHOD1(DidOverscroll, void(const DidOverscrollParams&));
176 virtual void DidStopFlinging() OVERRIDE {} 176 virtual void DidStopFlinging() override {}
177 virtual void DidReceiveInputEvent() OVERRIDE {} 177 virtual void DidReceiveInputEvent() override {}
178 178
179 private: 179 private:
180 DISALLOW_COPY_AND_ASSIGN(MockInputHandlerProxyClient); 180 DISALLOW_COPY_AND_ASSIGN(MockInputHandlerProxyClient);
181 }; 181 };
182 182
183 class MockInputHandlerProxyClientWithDidReceiveInputEvent 183 class MockInputHandlerProxyClientWithDidReceiveInputEvent
184 : public MockInputHandlerProxyClient { 184 : public MockInputHandlerProxyClient {
185 public: 185 public:
186 MockInputHandlerProxyClientWithDidReceiveInputEvent() {} 186 MockInputHandlerProxyClientWithDidReceiveInputEvent() {}
187 virtual ~MockInputHandlerProxyClientWithDidReceiveInputEvent() {} 187 virtual ~MockInputHandlerProxyClientWithDidReceiveInputEvent() {}
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 wheel.scrollByPage = true; 1997 wheel.scrollByPage = true;
1998 1998
1999 EXPECT_CALL(mock_client, DidReceiveInputEvent()); 1999 EXPECT_CALL(mock_client, DidReceiveInputEvent());
2000 2000
2001 input_handler_->HandleInputEvent(wheel); 2001 input_handler_->HandleInputEvent(wheel);
2002 testing::Mock::VerifyAndClearExpectations(&mock_client); 2002 testing::Mock::VerifyAndClearExpectations(&mock_client);
2003 } 2003 }
2004 2004
2005 } // namespace 2005 } // namespace
2006 } // namespace content 2006 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/input_handler_proxy.h ('k') | content/renderer/input/input_handler_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698