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

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

Issue 2641023003: Views overlay scrollbars - show on mouse hover. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_ 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_ 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/views/controls/scrollbar/base_scroll_bar.h" 9 #include "ui/views/controls/scrollbar/base_scroll_bar.h"
10 #include "ui/views/controls/scrollbar/base_scroll_bar_thumb.h" 10 #include "ui/views/controls/scrollbar/base_scroll_bar_thumb.h"
11 11
12 namespace views { 12 namespace views {
13 13
14 // The transparent scrollbar which overlays its contents. 14 // The transparent scrollbar which overlays its contents.
15 class VIEWS_EXPORT OverlayScrollBar : public BaseScrollBar { 15 class VIEWS_EXPORT OverlayScrollBar : public BaseScrollBar {
16 public: 16 public:
17 explicit OverlayScrollBar(bool horizontal); 17 explicit OverlayScrollBar(bool horizontal);
18 ~OverlayScrollBar() override; 18 ~OverlayScrollBar() override;
19 19
20 protected: 20 protected:
21 // BaseScrollBar overrides: 21 // BaseScrollBar overrides:
22 gfx::Rect GetTrackBounds() const override; 22 gfx::Rect GetTrackBounds() const override;
23 23
24 // ScrollBar overrides: 24 // ScrollBar overrides:
25 int GetThickness() const override; 25 int GetThickness() const override;
26 bool OverlapsContent() const override; 26 bool OverlapsContent() const override;
27 27
28 // View overrides: 28 // View overrides:
29 void Layout() override; 29 void Layout() override;
30 bool CanAcceptEvent(const ui::Event& event) override;
31 void OnMouseEntered(const ui::MouseEvent& event) override; 30 void OnMouseEntered(const ui::MouseEvent& event) override;
32 void OnMouseExited(const ui::MouseEvent& event) override; 31 void OnMouseExited(const ui::MouseEvent& event) override;
33 32
34 private: 33 private:
35 class Thumb : public BaseScrollBarThumb { 34 class Thumb : public BaseScrollBarThumb {
36 public: 35 public:
37 explicit Thumb(OverlayScrollBar* scroll_bar); 36 explicit Thumb(OverlayScrollBar* scroll_bar);
38 ~Thumb() override; 37 ~Thumb() override;
39 38
40 void Init(); 39 void Init();
(...skipping 20 matching lines...) Expand all
61 void StartHideCountdown(); 60 void StartHideCountdown();
62 61
63 base::Timer hide_timer_; 62 base::Timer hide_timer_;
64 63
65 DISALLOW_COPY_AND_ASSIGN(OverlayScrollBar); 64 DISALLOW_COPY_AND_ASSIGN(OverlayScrollBar);
66 }; 65 };
67 66
68 } // namespace views 67 } // namespace views
69 68
70 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_ 69 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/scrollbar/overlay_scroll_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698