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

Side by Side Diff: ui/views/controls/scrollbar/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 unified diff | Download patch | Annotate | Revision Log
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_SCROLL_BAR_H_ 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 int GetMinPosition() const; 79 int GetMinPosition() const;
80 80
81 // Returns the position of the scrollbar. 81 // Returns the position of the scrollbar.
82 virtual int GetPosition() const = 0; 82 virtual int GetPosition() const = 0;
83 83
84 // Get the width or height of this scrollbar, for use in layout calculations. 84 // Get the width or height of this scrollbar, for use in layout calculations.
85 // For a vertical scrollbar, this is the width of the scrollbar, likewise it 85 // For a vertical scrollbar, this is the width of the scrollbar, likewise it
86 // is the height for a horizontal scrollbar. 86 // is the height for a horizontal scrollbar.
87 virtual int GetLayoutSize() const = 0; 87 virtual int GetLayoutSize() const = 0;
88 88
89 // Get the width or height for this scrollbar which overlaps with the content.
90 // Default is 0.
91 virtual int GetContentOverlapSize() const;
92
93 virtual void OnMouseEnteredScrollView(const ui::MouseEvent& event);
94 virtual void OnMouseExitedScrollView(const ui::MouseEvent& event);
95
89 protected: 96 protected:
90 // Create new scrollbar, either horizontal or vertical. These are protected 97 // Create new scrollbar, either horizontal or vertical. These are protected
91 // since you need to be creating either a NativeScrollBar or a 98 // since you need to be creating either a NativeScrollBar or a
92 // ImageScrollBar. 99 // ImageScrollBar.
93 explicit ScrollBar(bool is_horiz); 100 explicit ScrollBar(bool is_horiz);
94 101
95 private: 102 private:
96 const bool is_horiz_; 103 const bool is_horiz_;
97 104
98 ScrollBarController* controller_; 105 ScrollBarController* controller_;
99 106
100 int max_pos_; 107 int max_pos_;
101 108
102 DISALLOW_COPY_AND_ASSIGN(ScrollBar); 109 DISALLOW_COPY_AND_ASSIGN(ScrollBar);
103 }; 110 };
104 111
105 } // namespace views 112 } // namespace views
106 113
107 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ 114 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_
OLDNEW
« no previous file with comments | « ui/views/controls/scrollbar/overlay_scroll_bar.cc ('k') | ui/views/controls/scrollbar/scroll_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698