OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "chrome/views/scroll_view.h" | 5 #include "chrome/views/scroll_view.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/app/theme/theme_resources.h" | 8 #include "grit/theme_resources.h" |
9 #include "chrome/common/resource_bundle.h" | 9 #include "chrome/common/resource_bundle.h" |
10 #include "chrome/views/native_scroll_bar.h" | 10 #include "chrome/views/native_scroll_bar.h" |
11 #include "chrome/views/root_view.h" | 11 #include "chrome/views/root_view.h" |
12 | 12 |
13 namespace views { | 13 namespace views { |
14 | 14 |
15 const char* const ScrollView::kViewClassName = "chrome/views/ScrollView"; | 15 const char* const ScrollView::kViewClassName = "chrome/views/ScrollView"; |
16 | 16 |
17 // Viewport contains the contents View of the ScrollView. | 17 // Viewport contains the contents View of the ScrollView. |
18 class Viewport : public View { | 18 class Viewport : public View { |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 VariableRowHeightScrollHelper::RowInfo | 492 VariableRowHeightScrollHelper::RowInfo |
493 FixedRowHeightScrollHelper::GetRowInfo(int y) { | 493 FixedRowHeightScrollHelper::GetRowInfo(int y) { |
494 if (y < top_margin_) | 494 if (y < top_margin_) |
495 return RowInfo(0, top_margin_); | 495 return RowInfo(0, top_margin_); |
496 return RowInfo((y - top_margin_) / row_height_ * row_height_ + top_margin_, | 496 return RowInfo((y - top_margin_) / row_height_ * row_height_ + top_margin_, |
497 row_height_); | 497 row_height_); |
498 } | 498 } |
499 | 499 |
500 } // namespace views | 500 } // namespace views |
501 | 501 |
OLD | NEW |