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

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

Issue 1671313002: MacViews: Overlay Scrollbars with Show/Hide Animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_NATIVE_SCROLL_BAR_H_ 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_H_
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_H_ 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 18 matching lines...) Expand all
29 static const char kViewClassName[]; 29 static const char kViewClassName[];
30 30
31 // Create new scrollbar, either horizontal or vertical. 31 // Create new scrollbar, either horizontal or vertical.
32 explicit NativeScrollBar(bool is_horiz); 32 explicit NativeScrollBar(bool is_horiz);
33 ~NativeScrollBar() override; 33 ~NativeScrollBar() override;
34 34
35 // Return the system sizes. 35 // Return the system sizes.
36 static int GetHorizontalScrollBarHeight(const ui::NativeTheme* theme); 36 static int GetHorizontalScrollBarHeight(const ui::NativeTheme* theme);
37 static int GetVerticalScrollBarWidth(const ui::NativeTheme* theme); 37 static int GetVerticalScrollBarWidth(const ui::NativeTheme* theme);
38 38
39 protected:
40 virtual NativeScrollBarWrapper* CreateWrapper();
41
39 private: 42 private:
40 friend class NativeScrollBarTest; 43 friend class NativeScrollBarTest;
41 FRIEND_TEST_ALL_PREFIXES(NativeScrollBarTest, Scrolling); 44 FRIEND_TEST_ALL_PREFIXES(NativeScrollBarTest, Scrolling);
42 45
43 // Overridden from View. 46 // Overridden from View.
44 gfx::Size GetPreferredSize() const override; 47 gfx::Size GetPreferredSize() const override;
45 void Layout() override; 48 void Layout() override;
46 void ViewHierarchyChanged( 49 void ViewHierarchyChanged(
47 const ViewHierarchyChangedDetails& details) override; 50 const ViewHierarchyChangedDetails& details) override;
48 const char* GetClassName() const override; 51 const char* GetClassName() const override;
(...skipping 12 matching lines...) Expand all
61 64
62 // init border 65 // init border
63 NativeScrollBarWrapper* native_wrapper_; 66 NativeScrollBarWrapper* native_wrapper_;
64 67
65 DISALLOW_COPY_AND_ASSIGN(NativeScrollBar); 68 DISALLOW_COPY_AND_ASSIGN(NativeScrollBar);
66 }; 69 };
67 70
68 } // namespace views 71 } // namespace views
69 72
70 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_H_ 73 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698