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.
5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_
8 #include "ui/gfx/animation/slide_animation.h"
9 #include "ui/views/controls/scrollbar/base_scroll_bar.h"
13 // The transparent scrollbar which overlays its contents.
14 class VIEWS_EXPORT OverlayScrollBar
: public BaseScrollBar
{
16 explicit OverlayScrollBar(bool horizontal
);
17 virtual ~OverlayScrollBar();
20 // BaseScrollBar overrides:
21 virtual gfx::Rect
GetTrackBounds() const OVERRIDE
;
22 virtual void OnGestureEvent(ui::GestureEvent
* event
) OVERRIDE
;
24 // ScrollBar overrides:
25 virtual int GetLayoutSize() const OVERRIDE
;
26 virtual int GetContentOverlapSize() const OVERRIDE
;
27 virtual void OnMouseEnteredScrollView(const ui::MouseEvent
& event
) OVERRIDE
;
28 virtual void OnMouseExitedScrollView(const ui::MouseEvent
& event
) OVERRIDE
;
31 virtual gfx::Size
GetPreferredSize() const OVERRIDE
;
32 virtual void Layout() OVERRIDE
;
33 virtual void OnPaint(gfx::Canvas
* canvas
) OVERRIDE
;
36 gfx::SlideAnimation animation_
;
37 DISALLOW_COPY_AND_ASSIGN(OverlayScrollBar
);
42 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_