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

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

Issue 10358013: views: Mark single-argument constructors as explicit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "ui/views/view.h" 11 #include "ui/views/view.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 // Get the width or height of this scrollbar, for use in layout calculations. 86 // Get the width or height of this scrollbar, for use in layout calculations.
87 // For a vertical scrollbar, this is the width of the scrollbar, likewise it 87 // For a vertical scrollbar, this is the width of the scrollbar, likewise it
88 // is the height for a horizontal scrollbar. 88 // is the height for a horizontal scrollbar.
89 virtual int GetLayoutSize() const = 0; 89 virtual int GetLayoutSize() const = 0;
90 90
91 protected: 91 protected:
92 // Create new scrollbar, either horizontal or vertical. These are protected 92 // Create new scrollbar, either horizontal or vertical. These are protected
93 // since you need to be creating either a NativeScrollBar or a 93 // since you need to be creating either a NativeScrollBar or a
94 // BitmapScrollBar. 94 // BitmapScrollBar.
95 ScrollBar(bool is_horiz); 95 explicit ScrollBar(bool is_horiz);
96 96
97 private: 97 private:
98 const bool is_horiz_; 98 const bool is_horiz_;
99 99
100 ScrollBarController* controller_; 100 ScrollBarController* controller_;
101 101
102 int max_pos_; 102 int max_pos_;
103 103
104 DISALLOW_COPY_AND_ASSIGN(ScrollBar); 104 DISALLOW_COPY_AND_ASSIGN(ScrollBar);
105 }; 105 };
106 106
107 } // namespace views 107 } // namespace views
108 108
109 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_ 109 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_SCROLL_BAR_H_
OLDNEW
« no previous file with comments | « ui/views/controls/menu/native_menu_win.cc ('k') | ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698