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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/scrollbar/overlay_scroll_bar.h
diff --git a/ui/views/controls/scrollbar/overlay_scroll_bar.h b/ui/views/controls/scrollbar/overlay_scroll_bar.h
new file mode 100644
index 0000000000000000000000000000000000000000..c664ec70d91cd837d7569f57f604ed4c44fd0b28
--- /dev/null
+++ b/ui/views/controls/scrollbar/overlay_scroll_bar.h
@@ -0,0 +1,41 @@
+// Copyright (c) 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 UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_
+#define UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_
+
+#include "ui/base/animation/slide_animation.h"
+#include "ui/views/controls/scrollbar/base_scroll_bar.h"
+
+namespace views {
+
+// The transparent scrollbar which overlays its contents.
+class VIEWS_EXPORT OverlayScrollBar : public BaseScrollBar {
+ public:
+ explicit OverlayScrollBar(bool horizontal);
+ virtual ~OverlayScrollBar();
+
+ protected:
+ // BaseScrollBar overrides:
+ virtual gfx::Rect GetTrackBounds() const OVERRIDE;
+
+ // ScrollBar overrides:
+ virtual int GetLayoutSize() const OVERRIDE;
+ virtual int GetContentOverlapSize() const OVERRIDE;
+ virtual void OnMouseEnteredScrollView(const ui::MouseEvent& event) OVERRIDE;
+ virtual void OnMouseExitedScrollView(const ui::MouseEvent& event) OVERRIDE;
+
+ // View overrides:
+ virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual void Layout() OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+
+ private:
+ ui::SlideAnimation animation_;
+ DISALLOW_COPY_AND_ASSIGN(OverlayScrollBar);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_
« 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