OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef FakeWebScrollbarThemeGeometry_h | 5 #ifndef FakeWebScrollbarThemeGeometry_h |
6 #define FakeWebScrollbarThemeGeometry_h | 6 #define FakeWebScrollbarThemeGeometry_h |
7 | 7 |
8 #include <public/WebScrollbarThemeGeometry.h> | 8 #include <public/WebScrollbarThemeGeometry.h> |
9 #include <wtf/PassOwnPtr.h> | |
10 | 9 |
11 namespace WebKit { | 10 namespace WebKit { |
12 | 11 |
13 class FakeWebScrollbarThemeGeometry : public WebKit::WebScrollbarThemeGeometry { | 12 class FakeWebScrollbarThemeGeometry : public WebKit::WebScrollbarThemeGeometry { |
14 public: | 13 public: |
15 static PassOwnPtr<WebKit::WebScrollbarThemeGeometry> create() { return adopt
Ptr(new WebKit::FakeWebScrollbarThemeGeometry()); } | 14 static scoped_ptr<WebKit::WebScrollbarThemeGeometry> create() { return scope
d_ptr<WebKit::WebScrollbarThemeGeometry>(new WebKit::FakeWebScrollbarThemeGeomet
ry()); } |
16 | 15 |
17 virtual WebKit::WebScrollbarThemeGeometry* clone() const OVERRIDE | 16 virtual WebKit::WebScrollbarThemeGeometry* clone() const OVERRIDE |
18 { | 17 { |
19 return new FakeWebScrollbarThemeGeometry(); | 18 return new FakeWebScrollbarThemeGeometry(); |
20 } | 19 } |
21 | 20 |
22 virtual int thumbPosition(WebScrollbar*) OVERRIDE { return 0; } | 21 virtual int thumbPosition(WebScrollbar*) OVERRIDE { return 0; } |
23 virtual int thumbLength(WebScrollbar*) OVERRIDE { return 0; } | 22 virtual int thumbLength(WebScrollbar*) OVERRIDE { return 0; } |
24 virtual int trackPosition(WebScrollbar*) OVERRIDE { return 0; } | 23 virtual int trackPosition(WebScrollbar*) OVERRIDE { return 0; } |
25 virtual int trackLength(WebScrollbar*) OVERRIDE { return 0; } | 24 virtual int trackLength(WebScrollbar*) OVERRIDE { return 0; } |
(...skipping 13 matching lines...) Expand all Loading... |
39 { | 38 { |
40 startTrack = WebRect(); | 39 startTrack = WebRect(); |
41 thumb = WebRect(); | 40 thumb = WebRect(); |
42 endTrack = WebRect(); | 41 endTrack = WebRect(); |
43 } | 42 } |
44 }; | 43 }; |
45 | 44 |
46 } // namespace WebKit | 45 } // namespace WebKit |
47 | 46 |
48 #endif // FakeWebScrollbarThemeGeometry_h | 47 #endif // FakeWebScrollbarThemeGeometry_h |
OLD | NEW |