summaryrefslogtreecommitdiff
path: root/chromium/cc/input/scrollbar.h
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2013-08-15 21:46:11 +0200
committerZeno Albisser <zeno.albisser@digia.com>2013-08-15 21:46:11 +0200
commit679147eead574d186ebf3069647b4c23e8ccace6 (patch)
treefc247a0ac8ff119f7c8550879ebb6d3dd8d1ff69 /chromium/cc/input/scrollbar.h
downloadqtwebengine-chromium-679147eead574d186ebf3069647b4c23e8ccace6.tar.gz
Initial import.
Diffstat (limited to 'chromium/cc/input/scrollbar.h')
-rw-r--r--chromium/cc/input/scrollbar.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/chromium/cc/input/scrollbar.h b/chromium/cc/input/scrollbar.h
new file mode 100644
index 00000000000..4c7e33837f6
--- /dev/null
+++ b/chromium/cc/input/scrollbar.h
@@ -0,0 +1,40 @@
+// Copyright 2013 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 CC_INPUT_SCROLLBAR_H_
+#define CC_INPUT_SCROLLBAR_H_
+
+#include "cc/base/cc_export.h"
+#include "ui/gfx/point.h"
+#include "ui/gfx/rect.h"
+
+class SkCanvas;
+
+namespace cc {
+
+enum ScrollbarOrientation { HORIZONTAL, VERTICAL };
+enum ScrollDirection { SCROLL_BACKWARD, SCROLL_FORWARD };
+// For now, TRACK includes everything but the thumb including background and
+// buttons.
+enum ScrollbarPart { THUMB, TRACK };
+
+class Scrollbar {
+ public:
+ virtual ~Scrollbar() {}
+
+ virtual ScrollbarOrientation Orientation() const = 0;
+ virtual gfx::Point Location() const = 0;
+ virtual bool IsOverlay() const = 0;
+ virtual bool HasThumb() const = 0;
+ virtual int ThumbThickness() const = 0;
+ virtual int ThumbLength() const = 0;
+ virtual gfx::Rect TrackRect() const = 0;
+ virtual void PaintPart(SkCanvas* canvas,
+ ScrollbarPart part,
+ gfx::Rect content_rect) = 0;
+};
+
+} // namespace cc
+
+#endif // CC_INPUT_SCROLLBAR_H_