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

Unified Diff: cc/scrollbar_layer_impl.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/scrollbar_layer_impl.h ('k') | cc/scrollbar_layer_impl_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scrollbar_layer_impl.cc
diff --git a/cc/scrollbar_layer_impl.cc b/cc/scrollbar_layer_impl.cc
index 2f49176334470b6c7c8f49c3f0add2f997129259..f2996310d95eefb44b98d1fa8f890f52b746a522 100644
--- a/cc/scrollbar_layer_impl.cc
+++ b/cc/scrollbar_layer_impl.cc
@@ -20,7 +20,7 @@ scoped_ptr<ScrollbarLayerImpl> ScrollbarLayerImpl::create(LayerTreeImpl* treeImp
}
ScrollbarLayerImpl::ScrollbarLayerImpl(LayerTreeImpl* treeImpl, int id)
- : LayerImpl(treeImpl, id)
+ : ScrollbarLayerImplBase(treeImpl, id)
, m_scrollbar(this)
, m_backTrackResourceId(0)
, m_foreTrackResourceId(0)
@@ -65,6 +65,26 @@ void ScrollbarLayerImpl::setScrollbarData(WebScrollbar* scrollbar)
m_geometry->update(scrollbar);
}
+float ScrollbarLayerImpl::currentPos() const
+{
+ return m_currentPos;
+}
+
+int ScrollbarLayerImpl::totalSize() const
+{
+ return m_totalSize;
+}
+
+int ScrollbarLayerImpl::maximum() const
+{
+ return m_maximum;
+}
+
+WebKit::WebScrollbar::Orientation ScrollbarLayerImpl::orientation() const
+{
+ return m_orientation;
+}
+
static gfx::RectF toUVRect(const gfx::Rect& r, const gfx::Rect& bounds)
{
return gfx::ScaleRect(r, 1.0 / bounds.width(), 1.0 / bounds.height());
« no previous file with comments | « cc/scrollbar_layer_impl.h ('k') | cc/scrollbar_layer_impl_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698