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

Unified Diff: ui/views/controls/scrollbar/native_scroll_bar_views.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/scrollbar/native_scroll_bar_views.cc
diff --git a/ui/views/controls/scrollbar/native_scroll_bar_views.cc b/ui/views/controls/scrollbar/native_scroll_bar_views.cc
index a8402e5c65591d0b837f333f89e6c73785619e4a..b4f83ccdf7b932e7942e6885e07bac762f73d7c0 100644
--- a/ui/views/controls/scrollbar/native_scroll_bar_views.cc
+++ b/ui/views/controls/scrollbar/native_scroll_bar_views.cc
@@ -32,7 +32,7 @@ class ScrollBarButton : public BaseScrollBarButton {
ScrollBarButton(ButtonListener* listener, Type type);
virtual ~ScrollBarButton();
- virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const OVERRIDE;
virtual const char* GetClassName() const OVERRIDE {
return "ScrollBarButton";
}
@@ -54,7 +54,7 @@ class ScrollBarThumb : public BaseScrollBarThumb {
explicit ScrollBarThumb(BaseScrollBar* scroll_bar);
virtual ~ScrollBarThumb();
- virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() const OVERRIDE;
virtual const char* GetClassName() const OVERRIDE {
return "ScrollBarThumb";
}
@@ -83,7 +83,7 @@ ScrollBarButton::ScrollBarButton(ButtonListener* listener, Type type)
ScrollBarButton::~ScrollBarButton() {
}
-gfx::Size ScrollBarButton::GetPreferredSize() {
+gfx::Size ScrollBarButton::GetPreferredSize() const {
return GetNativeTheme()->GetPartSize(GetNativeThemePart(),
GetNativeThemeState(),
GetNativeThemeParams());
@@ -164,7 +164,7 @@ ScrollBarThumb::ScrollBarThumb(BaseScrollBar* scroll_bar)
ScrollBarThumb::~ScrollBarThumb() {
}
-gfx::Size ScrollBarThumb::GetPreferredSize() {
+gfx::Size ScrollBarThumb::GetPreferredSize() const {
return GetNativeTheme()->GetPartSize(GetNativeThemePart(),
GetNativeThemeState(),
GetNativeThemeParams());
@@ -292,7 +292,7 @@ void NativeScrollBarViews::OnPaint(gfx::Canvas* canvas) {
GetNativeTheme()->Paint(canvas->sk_canvas(), part_, state_, bounds, params_);
}
-gfx::Size NativeScrollBarViews::GetPreferredSize() {
+gfx::Size NativeScrollBarViews::GetPreferredSize() const {
const ui::NativeTheme* theme = native_scroll_bar_->GetNativeTheme();
if (native_scroll_bar_->IsHorizontal())
return gfx::Size(0, GetHorizontalScrollBarHeight(theme));
« no previous file with comments | « ui/views/controls/scrollbar/native_scroll_bar_views.h ('k') | ui/views/controls/scrollbar/overlay_scroll_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698