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

Side by Side Diff: cc/scrollbar_layer_impl.h

Issue 11573015: Create abstract common base class for impl scrollbars. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased for landing Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « cc/cc.gyp ('k') | cc/scrollbar_layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SCROLLBAR_LAYER_IMPL_H_ 5 #ifndef CC_SCROLLBAR_LAYER_IMPL_H_
6 #define CC_SCROLLBAR_LAYER_IMPL_H_ 6 #define CC_SCROLLBAR_LAYER_IMPL_H_
7 7
8 #include "cc/cc_export.h" 8 #include "cc/cc_export.h"
9 #include "cc/layer_impl.h"
10 #include "cc/scrollbar_geometry_fixed_thumb.h" 9 #include "cc/scrollbar_geometry_fixed_thumb.h"
10 #include "cc/scrollbar_layer_impl_base.h"
11 #include <public/WebRect.h> 11 #include <public/WebRect.h>
12 #include <public/WebScrollbar.h>
13 #include <public/WebVector.h> 12 #include <public/WebVector.h>
14 13
15 namespace cc { 14 namespace cc {
16 15
17 class ScrollView; 16 class ScrollView;
18 17
19 class CC_EXPORT ScrollbarLayerImpl : public LayerImpl { 18 class CC_EXPORT ScrollbarLayerImpl : public ScrollbarLayerImplBase {
20 public: 19 public:
21 static scoped_ptr<ScrollbarLayerImpl> create(LayerTreeImpl* treeImpl, int id ); 20 static scoped_ptr<ScrollbarLayerImpl> create(LayerTreeImpl* treeImpl, int id );
22 virtual ~ScrollbarLayerImpl(); 21 virtual ~ScrollbarLayerImpl();
23 22
24 ScrollbarGeometryFixedThumb* scrollbarGeometry() const { return m_geometry.g et(); } 23 ScrollbarGeometryFixedThumb* scrollbarGeometry() const { return m_geometry.g et(); }
25 void setScrollbarGeometry(scoped_ptr<ScrollbarGeometryFixedThumb>); 24 void setScrollbarGeometry(scoped_ptr<ScrollbarGeometryFixedThumb>);
26 void setScrollbarData(WebKit::WebScrollbar*); 25 void setScrollbarData(WebKit::WebScrollbar*);
27 26
28 void setBackTrackResourceId(ResourceProvider::ResourceId id) { m_backTrackRe sourceId = id; } 27 void setBackTrackResourceId(ResourceProvider::ResourceId id) { m_backTrackRe sourceId = id; }
29 void setForeTrackResourceId(ResourceProvider::ResourceId id) { m_foreTrackRe sourceId = id; } 28 void setForeTrackResourceId(ResourceProvider::ResourceId id) { m_foreTrackRe sourceId = id; }
30 void setThumbResourceId(ResourceProvider::ResourceId id) { m_thumbResourceId = id; } 29 void setThumbResourceId(ResourceProvider::ResourceId id) { m_thumbResourceId = id; }
31 30
32 float currentPos() const { return m_currentPos; } 31 virtual float currentPos() const OVERRIDE;
33 void setCurrentPos(float currentPos) { m_currentPos = currentPos; } 32 void setCurrentPos(float currentPos) { m_currentPos = currentPos; }
34 33
35 int totalSize() const { return m_totalSize; } 34 virtual int totalSize() const OVERRIDE;
36 void setTotalSize(int totalSize) { m_totalSize = totalSize; } 35 void setTotalSize(int totalSize) { m_totalSize = totalSize; }
37 36
38 int maximum() const { return m_maximum; } 37 virtual int maximum() const OVERRIDE;
39 void setMaximum(int maximum) { m_maximum = maximum; } 38 void setMaximum(int maximum) { m_maximum = maximum; }
40 39
41 WebKit::WebScrollbar::Orientation orientation() const { return m_orientation ; } 40 virtual WebKit::WebScrollbar::Orientation orientation() const OVERRIDE;
42 41
43 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; 42 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE;
44 43
45 virtual void didLoseOutputSurface() OVERRIDE; 44 virtual void didLoseOutputSurface() OVERRIDE;
46 45
47 protected: 46 protected:
48 ScrollbarLayerImpl(LayerTreeImpl* treeImpl, int id); 47 ScrollbarLayerImpl(LayerTreeImpl* treeImpl, int id);
49 48
50 private: 49 private:
51 // nested class only to avoid namespace problem 50 // nested class only to avoid namespace problem
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 101
103 bool m_isScrollableAreaActive; 102 bool m_isScrollableAreaActive;
104 bool m_isScrollViewScrollbar; 103 bool m_isScrollViewScrollbar;
105 bool m_enabled; 104 bool m_enabled;
106 bool m_isCustomScrollbar; 105 bool m_isCustomScrollbar;
107 bool m_isOverlayScrollbar; 106 bool m_isOverlayScrollbar;
108 }; 107 };
109 108
110 } 109 }
111 #endif // CC_SCROLLBAR_LAYER_IMPL_H_ 110 #endif // CC_SCROLLBAR_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/scrollbar_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698