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

Side by Side Diff: views/controls/scroll_view.cc

Issue 8598031: views: Move widget/ directory to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland for real Created 9 years, 1 month 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
« no previous file with comments | « views/controls/native_control_win.cc ('k') | views/controls/scrollbar/base_scroll_bar.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/controls/scroll_view.h" 5 #include "views/controls/scroll_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/views/widget/root_view.h"
8 #include "views/controls/scrollbar/native_scroll_bar.h" 9 #include "views/controls/scrollbar/native_scroll_bar.h"
9 #include "views/widget/root_view.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 const char* const ScrollView::kViewClassName = "views/ScrollView"; 13 const char* const ScrollView::kViewClassName = "views/ScrollView";
14 14
15 // Viewport contains the contents View of the ScrollView. 15 // Viewport contains the contents View of the ScrollView.
16 class Viewport : public View { 16 class Viewport : public View {
17 public: 17 public:
18 Viewport() {} 18 Viewport() {}
19 virtual ~Viewport() {} 19 virtual ~Viewport() {}
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 492
493 VariableRowHeightScrollHelper::RowInfo 493 VariableRowHeightScrollHelper::RowInfo
494 FixedRowHeightScrollHelper::GetRowInfo(int y) { 494 FixedRowHeightScrollHelper::GetRowInfo(int y) {
495 if (y < top_margin_) 495 if (y < top_margin_)
496 return RowInfo(0, top_margin_); 496 return RowInfo(0, top_margin_);
497 return RowInfo((y - top_margin_) / row_height_ * row_height_ + top_margin_, 497 return RowInfo((y - top_margin_) / row_height_ * row_height_ + top_margin_,
498 row_height_); 498 row_height_);
499 } 499 }
500 500
501 } // namespace views 501 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/native_control_win.cc ('k') | views/controls/scrollbar/base_scroll_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698