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 CCScrollbarGeometryStub_h | 5 #ifndef CCScrollbarGeometryStub_h |
6 #define CCScrollbarGeometryStub_h | 6 #define CCScrollbarGeometryStub_h |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/cc_export.h" |
9 #include <public/WebScrollbarThemeGeometry.h> | 10 #include <public/WebScrollbarThemeGeometry.h> |
10 | 11 |
11 namespace cc { | 12 namespace cc { |
12 | 13 |
13 // This subclass wraps an existing scrollbar geometry class so that | 14 // This subclass wraps an existing scrollbar geometry class so that |
14 // another class can derive from it and override specific functions, while | 15 // another class can derive from it and override specific functions, while |
15 // passing through the remaining ones. | 16 // passing through the remaining ones. |
16 class ScrollbarGeometryStub : public WebKit::WebScrollbarThemeGeometry { | 17 class CC_EXPORT ScrollbarGeometryStub : public NON_EXPORTED_BASE(WebKit::WebScro
llbarThemeGeometry) { |
17 public: | 18 public: |
18 virtual ~ScrollbarGeometryStub(); | 19 virtual ~ScrollbarGeometryStub(); |
19 | 20 |
20 // Allow derived classes to update themselves from a scrollbar. | 21 // Allow derived classes to update themselves from a scrollbar. |
21 void update(WebKit::WebScrollbar*) { } | 22 void update(WebKit::WebScrollbar*) { } |
22 | 23 |
23 // WebScrollbarThemeGeometry interface | 24 // WebScrollbarThemeGeometry interface |
24 virtual WebKit::WebScrollbarThemeGeometry* clone() const OVERRIDE; | 25 virtual WebKit::WebScrollbarThemeGeometry* clone() const OVERRIDE; |
25 virtual int thumbPosition(WebKit::WebScrollbar*) OVERRIDE; | 26 virtual int thumbPosition(WebKit::WebScrollbar*) OVERRIDE; |
26 virtual int thumbLength(WebKit::WebScrollbar*) OVERRIDE; | 27 virtual int thumbLength(WebKit::WebScrollbar*) OVERRIDE; |
(...skipping 10 matching lines...) Expand all Loading... |
37 virtual WebKit::WebRect forwardButtonStartRect(WebKit::WebScrollbar*) OVERRI
DE; | 38 virtual WebKit::WebRect forwardButtonStartRect(WebKit::WebScrollbar*) OVERRI
DE; |
38 virtual WebKit::WebRect forwardButtonEndRect(WebKit::WebScrollbar*) OVERRIDE
; | 39 virtual WebKit::WebRect forwardButtonEndRect(WebKit::WebScrollbar*) OVERRIDE
; |
39 virtual WebKit::WebRect constrainTrackRectToTrackPieces(WebKit::WebScrollbar
*, const WebKit::WebRect&) OVERRIDE; | 40 virtual WebKit::WebRect constrainTrackRectToTrackPieces(WebKit::WebScrollbar
*, const WebKit::WebRect&) OVERRIDE; |
40 virtual void splitTrack(WebKit::WebScrollbar*, const WebKit::WebRect& track,
WebKit::WebRect& startTrack, WebKit::WebRect& thumb, WebKit::WebRect& endTrack)
OVERRIDE; | 41 virtual void splitTrack(WebKit::WebScrollbar*, const WebKit::WebRect& track,
WebKit::WebRect& startTrack, WebKit::WebRect& thumb, WebKit::WebRect& endTrack)
OVERRIDE; |
41 | 42 |
42 protected: | 43 protected: |
43 explicit ScrollbarGeometryStub(scoped_ptr<WebKit::WebScrollbarThemeGeometry>
); | 44 explicit ScrollbarGeometryStub(scoped_ptr<WebKit::WebScrollbarThemeGeometry>
); |
44 | 45 |
45 private: | 46 private: |
46 scoped_ptr<WebKit::WebScrollbarThemeGeometry> m_geometry; | 47 scoped_ptr<WebKit::WebScrollbarThemeGeometry> m_geometry; |
| 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(ScrollbarGeometryStub); |
47 }; | 50 }; |
48 | 51 |
49 } | 52 } |
50 | 53 |
51 #endif | 54 #endif |
OLD | NEW |