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

Side by Side Diff: ui/views/view.h

Issue 1680613002: Adding momentum/overscroll to views:: ScrollViews Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Tableview layout. aaaand I think we are done Created 4 years, 4 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
« no previous file with comments | « ui/views/examples/scroll_view_example.cc ('k') | ui/views/view.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) 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_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 962
963 // Scrolling ----------------------------------------------------------------- 963 // Scrolling -----------------------------------------------------------------
964 // TODO(beng): Figure out if this can live somewhere other than View, i.e. 964 // TODO(beng): Figure out if this can live somewhere other than View, i.e.
965 // closer to ScrollView. 965 // closer to ScrollView.
966 966
967 // Scrolls the specified region, in this View's coordinate system, to be 967 // Scrolls the specified region, in this View's coordinate system, to be
968 // visible. View's implementation passes the call onto the parent View (after 968 // visible. View's implementation passes the call onto the parent View (after
969 // adjusting the coordinates). It is up to views that only show a portion of 969 // adjusting the coordinates). It is up to views that only show a portion of
970 // the child view, such as Viewport, to override appropriately. 970 // the child view, such as Viewport, to override appropriately.
971 virtual void ScrollRectToVisible(const gfx::Rect& rect); 971 virtual void ScrollRectToVisible(const gfx::Rect& rect);
972 virtual ScrollView* EnclosingScrollView();
972 973
973 // The following methods are used by ScrollView to determine the amount 974 // The following methods are used by ScrollView to determine the amount
974 // to scroll relative to the visible bounds of the view. For example, a 975 // to scroll relative to the visible bounds of the view. For example, a
975 // return value of 10 indicates the scrollview should scroll 10 pixels in 976 // return value of 10 indicates the scrollview should scroll 10 pixels in
976 // the appropriate direction. 977 // the appropriate direction.
977 // 978 //
978 // Each method takes the following parameters: 979 // Each method takes the following parameters:
979 // 980 //
980 // is_horizontal: if true, scrolling is along the horizontal axis, otherwise 981 // is_horizontal: if true, scrolling is along the horizontal axis, otherwise
981 // the vertical axis. 982 // the vertical axis.
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 // Belongs to this view, but it's reference-counted on some platforms 1570 // Belongs to this view, but it's reference-counted on some platforms
1570 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1571 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1571 NativeViewAccessibility* native_view_accessibility_; 1572 NativeViewAccessibility* native_view_accessibility_;
1572 1573
1573 DISALLOW_COPY_AND_ASSIGN(View); 1574 DISALLOW_COPY_AND_ASSIGN(View);
1574 }; 1575 };
1575 1576
1576 } // namespace views 1577 } // namespace views
1577 1578
1578 #endif // UI_VIEWS_VIEW_H_ 1579 #endif // UI_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/examples/scroll_view_example.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698