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

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

Issue 2555973002: Views (native UI) overlay scrollbars: match blink overlay scrollbar (Closed)
Patch Set: Created 4 years 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 GetLayoutSize() const override; 25 int GetLayoutSize() const override;
26 int GetContentOverlapSize() const override; 26 int GetContentOverlapSize() 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;
30 void OnMouseEntered(const ui::MouseEvent& event) override; 31 void OnMouseEntered(const ui::MouseEvent& event) override;
31 void OnMouseExited(const ui::MouseEvent& event) override; 32 void OnMouseExited(const ui::MouseEvent& event) override;
32 33
33 private: 34 private:
34 class Thumb : public BaseScrollBarThumb { 35 class Thumb : public BaseScrollBarThumb {
35 public: 36 public:
36 explicit Thumb(OverlayScrollBar* scroll_bar); 37 explicit Thumb(OverlayScrollBar* scroll_bar);
37 ~Thumb() override; 38 ~Thumb() override;
38 39
39 void Init(); 40 void Init();
(...skipping 20 matching lines...) Expand all
60 void StartHideCountdown(); 61 void StartHideCountdown();
61 62
62 base::Timer hide_timer_; 63 base::Timer hide_timer_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(OverlayScrollBar); 65 DISALLOW_COPY_AND_ASSIGN(OverlayScrollBar);
65 }; 66 };
66 67
67 } // namespace views 68 } // namespace views
68 69
69 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_OVERLAY_SCROLL_BAR_H_ 70 #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