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

Side by Side Diff: content/test/web_gesture_curve_mock.h

Issue 1874903002: Convert //content from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent Created 4 years, 8 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 #ifndef CONTENT_TEST_WEB_GESTURE_CURVE_MOCK_H_ 5 #ifndef CONTENT_TEST_WEB_GESTURE_CURVE_MOCK_H_
6 #define CONTENT_TEST_WEB_GESTURE_CURVE_MOCK_H_ 6 #define CONTENT_TEST_WEB_GESTURE_CURVE_MOCK_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 11 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
11 #include "third_party/WebKit/public/platform/WebGestureCurve.h" 12 #include "third_party/WebKit/public/platform/WebGestureCurve.h"
12 #include "third_party/WebKit/public/platform/WebSize.h" 13 #include "third_party/WebKit/public/platform/WebSize.h"
13 14
14 // A simple class for mocking a WebGestureCurve. The curve flings at velocity 15 // A simple class for mocking a WebGestureCurve. The curve flings at velocity
15 // indefinitely. 16 // indefinitely.
16 class WebGestureCurveMock : public blink::WebGestureCurve { 17 class WebGestureCurveMock : public blink::WebGestureCurve {
17 public: 18 public:
18 WebGestureCurveMock(const blink::WebFloatPoint& velocity, 19 WebGestureCurveMock(const blink::WebFloatPoint& velocity,
19 const blink::WebSize& cumulative_scroll); 20 const blink::WebSize& cumulative_scroll);
20 ~WebGestureCurveMock() override; 21 ~WebGestureCurveMock() override;
21 22
22 // Returns false if curve has finished and can no longer be applied. 23 // Returns false if curve has finished and can no longer be applied.
23 bool apply(double time, blink::WebGestureCurveTarget* target) override; 24 bool apply(double time, blink::WebGestureCurveTarget* target) override;
24 25
25 private: 26 private:
26 blink::WebFloatPoint velocity_; 27 blink::WebFloatPoint velocity_;
27 blink::WebSize cumulative_scroll_; 28 blink::WebSize cumulative_scroll_;
28 29
29 DISALLOW_COPY_AND_ASSIGN(WebGestureCurveMock); 30 DISALLOW_COPY_AND_ASSIGN(WebGestureCurveMock);
30 }; 31 };
31 32
32 #endif // CONTENT_TEST_WEB_GESTURE_CURVE_MOCK_H_ 33 #endif // CONTENT_TEST_WEB_GESTURE_CURVE_MOCK_H_
OLDNEW
« no previous file with comments | « content/test/test_render_view_host_factory.cc ('k') | content/utility/in_process_utility_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698