| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_COCOA_SCROLL_BAR_H_ | 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_COCOA_SCROLL_BAR_H_ |
| 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_COCOA_SCROLL_BAR_H_ | 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_COCOA_SCROLL_BAR_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #import "base/mac/scoped_nsobject.h" | 9 #import "base/mac/scoped_nsobject.h" |
| 10 #include "ui/compositor/layer_animation_observer.h" | 10 #include "ui/compositor/layer_animation_observer.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 NSScrollerStyle GetScrollerStyle() const { return scroller_style_; } | 52 NSScrollerStyle GetScrollerStyle() const { return scroller_style_; } |
| 53 | 53 |
| 54 // Returns true if the opacity is 0.0. | 54 // Returns true if the opacity is 0.0. |
| 55 bool IsScrollbarFullyHidden() const; | 55 bool IsScrollbarFullyHidden() const; |
| 56 | 56 |
| 57 protected: | 57 protected: |
| 58 // BaseScrollBar: | 58 // BaseScrollBar: |
| 59 gfx::Rect GetTrackBounds() const override; | 59 gfx::Rect GetTrackBounds() const override; |
| 60 | 60 |
| 61 // ScrollBar: | 61 // ScrollBar: |
| 62 int GetLayoutSize() const override; | 62 int GetThickness() const override; |
| 63 int GetContentOverlapSize() const override; | 63 bool OverlapsContent() const override; |
| 64 | 64 |
| 65 // View: | 65 // View: |
| 66 void Layout() override; | 66 void Layout() override; |
| 67 gfx::Size GetPreferredSize() const override; | 67 gfx::Size GetPreferredSize() const override; |
| 68 void OnPaint(gfx::Canvas* canvas) override; | 68 void OnPaint(gfx::Canvas* canvas) override; |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 friend class BaseScrollBar; // For BaseScrollBar::GetHideTimerForTest(). | 71 friend class BaseScrollBar; // For BaseScrollBar::GetHideTimerForTest(). |
| 72 | 72 |
| 73 // Methods to change the visibility of the scrollbar. | 73 // Methods to change the visibility of the scrollbar. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 // The bridge for NSScroller. | 121 // The bridge for NSScroller. |
| 122 base::scoped_nsobject<ViewsScrollbarBridge> bridge_; | 122 base::scoped_nsobject<ViewsScrollbarBridge> bridge_; |
| 123 | 123 |
| 124 DISALLOW_COPY_AND_ASSIGN(CocoaScrollBar); | 124 DISALLOW_COPY_AND_ASSIGN(CocoaScrollBar); |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace views | 127 } // namespace views |
| 128 | 128 |
| 129 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_COCOA_SCROLL_BAR_H_ | 129 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_COCOA_SCROLL_BAR_H_ |
| OLD | NEW |