diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-12 22:43:41 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-12 22:43:41 +0000 |
commit | cd57cc5a246367c2558fefa04ae9eca8f4d545d2 (patch) | |
tree | a2235045e9c5e4ff028d641b76f5d01aa5461b26 /cc/scrollbar_geometry_fixed_thumb.h | |
parent | 3fe7ba055be580443445895c0ee01ada3b628487 (diff) | |
download | chromium_src-cd57cc5a246367c2558fefa04ae9eca8f4d545d2.zip chromium_src-cd57cc5a246367c2558fefa04ae9eca8f4d545d2.tar.gz chromium_src-cd57cc5a246367c2558fefa04ae9eca8f4d545d2.tar.bz2 |
[cc] Rename all cc/ filenames to Chromium style
BUG=155413
Review URL: https://codereview.chromium.org/11122003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161671 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/scrollbar_geometry_fixed_thumb.h')
-rw-r--r-- | cc/scrollbar_geometry_fixed_thumb.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/cc/scrollbar_geometry_fixed_thumb.h b/cc/scrollbar_geometry_fixed_thumb.h index 638cbb2..fe0db12 100644 --- a/cc/scrollbar_geometry_fixed_thumb.h +++ b/cc/scrollbar_geometry_fixed_thumb.h @@ -1,3 +1,39 @@ // Copyright 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + +#ifndef CCScrollbarGeometryFixedThumb_h +#define CCScrollbarGeometryFixedThumb_h + +#include "CCScrollbarGeometryStub.h" +#include "IntSize.h" + +namespace cc { + +// This scrollbar geometry class behaves exactly like a normal geometry except +// it always returns a fixed thumb length. This allows a page to zoom (changing +// the total size of the scrollable area, changing the thumb length) while not +// requiring the thumb resource to be repainted. +class CCScrollbarGeometryFixedThumb : public CCScrollbarGeometryStub { +public: + static PassOwnPtr<CCScrollbarGeometryFixedThumb> create(PassOwnPtr<WebKit::WebScrollbarThemeGeometry>); + virtual ~CCScrollbarGeometryFixedThumb(); + + // Update thumb length from scrollbar + void update(WebKit::WebScrollbar*); + + // WebScrollbarThemeGeometry interface + virtual WebKit::WebScrollbarThemeGeometry* clone() const OVERRIDE; + virtual int thumbLength(WebKit::WebScrollbar*) OVERRIDE; + virtual int thumbPosition(WebKit::WebScrollbar*) OVERRIDE; + virtual void splitTrack(WebKit::WebScrollbar*, const WebKit::WebRect& track, WebKit::WebRect& startTrack, WebKit::WebRect& thumb, WebKit::WebRect& endTrack) OVERRIDE; + +private: + explicit CCScrollbarGeometryFixedThumb(PassOwnPtr<WebKit::WebScrollbarThemeGeometry>); + + IntSize m_thumbSize; +}; + +} + +#endif |