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 CC_LAYERS_SCROLLBAR_GEOMETRY_STUB_H_ | 5 #ifndef CC_LAYERS_SCROLLBAR_GEOMETRY_STUB_H_ |
6 #define CC_LAYERS_SCROLLBAR_GEOMETRY_STUB_H_ | 6 #define CC_LAYERS_SCROLLBAR_GEOMETRY_STUB_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarThemeGe
ometry.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebScrollbarThemeGe
ometry.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 | 13 |
14 // This subclass wraps an existing scrollbar geometry class so that | 14 // This subclass wraps an existing scrollbar geometry class so that |
15 // another class can derive from it and override specific functions, while | 15 // another class can derive from it and override specific functions, while |
16 // passing through the remaining ones. | 16 // passing through the remaining ones. |
17 class CC_EXPORT ScrollbarGeometryStub : | 17 class CC_EXPORT ScrollbarGeometryStub |
18 public NON_EXPORTED_BASE(WebKit::WebScrollbarThemeGeometry) { | 18 : public NON_EXPORTED_BASE(WebKit::WebScrollbarThemeGeometry) { |
19 public: | 19 public: |
20 virtual ~ScrollbarGeometryStub(); | 20 virtual ~ScrollbarGeometryStub(); |
21 | 21 |
22 // Allow derived classes to update themselves from a scrollbar. | 22 // Allow derived classes to update themselves from a scrollbar. |
23 void Update(WebKit::WebScrollbar* scrollbar) {} | 23 void Update(WebKit::WebScrollbar* scrollbar) {} |
24 | 24 |
25 // WebScrollbarThemeGeometry interface | 25 // WebScrollbarThemeGeometry interface |
26 virtual WebKit::WebScrollbarThemeGeometry* clone() const OVERRIDE; | 26 virtual WebKit::WebScrollbarThemeGeometry* clone() const OVERRIDE; |
27 virtual int thumbPosition(WebKit::WebScrollbar* scrollbar) OVERRIDE; | 27 virtual int thumbPosition(WebKit::WebScrollbar* scrollbar) OVERRIDE; |
28 virtual int thumbLength(WebKit::WebScrollbar* scrollbar) OVERRIDE; | 28 virtual int thumbLength(WebKit::WebScrollbar* scrollbar) OVERRIDE; |
(...skipping 25 matching lines...) Expand all Loading... |
54 protected: | 54 protected: |
55 explicit ScrollbarGeometryStub( | 55 explicit ScrollbarGeometryStub( |
56 scoped_ptr<WebKit::WebScrollbarThemeGeometry> scrollbar); | 56 scoped_ptr<WebKit::WebScrollbarThemeGeometry> scrollbar); |
57 | 57 |
58 private: | 58 private: |
59 scoped_ptr<WebKit::WebScrollbarThemeGeometry> geometry_; | 59 scoped_ptr<WebKit::WebScrollbarThemeGeometry> geometry_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(ScrollbarGeometryStub); | 61 DISALLOW_COPY_AND_ASSIGN(ScrollbarGeometryStub); |
62 }; | 62 }; |
63 | 63 |
64 } | 64 } // namespace cc |
65 | 65 |
66 #endif // CC_LAYERS_SCROLLBAR_GEOMETRY_STUB_H_ | 66 #endif // CC_LAYERS_SCROLLBAR_GEOMETRY_STUB_H_ |
OLD | NEW |