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

Side by Side Diff: ui/views/controls/scrollbar/overlay_scroll_bar.h

Issue 16171010: Introduces a new scrollbar for message_center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GetVisibleSize -> GetContentOverlapSize 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
« no previous file with comments | « ui/views/controls/scroll_view.cc ('k') | ui/views/controls/scrollbar/overlay_scroll_bar.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 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 UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_
7
8 #include "ui/base/animation/slide_animation.h"
9 #include "ui/views/controls/scrollbar/base_scroll_bar.h"
10
11 namespace views {
12
13 // The transparent scrollbar which overlays its contents.
14 class VIEWS_EXPORT OverlayScrollBar : public BaseScrollBar {
15 public:
16 explicit OverlayScrollBar(bool horizontal);
17 virtual ~OverlayScrollBar();
18
19 protected:
20 // BaseScrollBar overrides:
21 virtual gfx::Rect GetTrackBounds() const OVERRIDE;
22
23 // ScrollBar overrides:
24 virtual int GetLayoutSize() const OVERRIDE;
25 virtual int GetContentOverlapSize() const OVERRIDE;
26 virtual void OnMouseEnteredScrollView(const ui::MouseEvent& event) OVERRIDE;
27 virtual void OnMouseExitedScrollView(const ui::MouseEvent& event) OVERRIDE;
28
29 // View overrides:
30 virtual gfx::Size GetPreferredSize() OVERRIDE;
31 virtual void Layout() OVERRIDE;
32 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
33
34 private:
35 ui::SlideAnimation animation_;
36 DISALLOW_COPY_AND_ASSIGN(OverlayScrollBar);
37 };
38
39 } // namespace views
40
41 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_
OLDNEW
« no previous file with comments | « ui/views/controls/scroll_view.cc ('k') | ui/views/controls/scrollbar/overlay_scroll_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698