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

Side by Side Diff: cc/input/inner_viewport_scrollbar.h

Issue 16679011: Add viewport scrollbar class to support overlay scrollbars for pinch zoom virtual viewport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add scrollbars layers in compositor, plumb layer ids to LayerTreeImpl. Created 7 years, 6 months 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
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_INPUT_INNER_VIEWPORT_SCROLLBAR_H_
6 #define CC_INPUT_INNER_VIEWPORT_SCROLLBAR_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "cc/base/cc_export.h"
10 #include "cc/input/scrollbar.h"
11 #include "ui/gfx/point.h"
12 #include "ui/gfx/rect.h"
13
14 namespace cc {
15
16 class Layer;
17
18 class CC_EXPORT InnerViewportScrollbar : public Scrollbar {
19 public:
20 InnerViewportScrollbar(scoped_refptr<Layer> scroll_layer,
21 scoped_refptr<Layer> clip_layer_,
22 ScrollbarOrientation orientation,
23 size_t thickness);
24 virtual ~InnerViewportScrollbar();
25
26 virtual ScrollbarOrientation Orientation() const OVERRIDE;
27 virtual gfx::Point Location() const OVERRIDE;
28 virtual bool IsOverlay() const OVERRIDE;
29 virtual bool HasThumb() const OVERRIDE;
30 virtual int ThumbThickness() const OVERRIDE;
31 virtual int ThumbLength() const OVERRIDE;
32 virtual gfx::Rect TrackRect() const OVERRIDE;
33 virtual void PaintPart(SkCanvas* canvas,
34 ScrollbarPart part,
35 gfx::Rect content_rect) OVERRIDE;
36
37 private:
38 scoped_refptr<Layer> scroll_layer_;
39 scoped_refptr<Layer> clip_layer_;
40 ScrollbarOrientation orientation_;
41 const size_t thickness_;
42 };
43
44 } // namespace cc
45
46 #endif // CC_INPUT_INNER_VIEWPORT_SCROLLBAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698