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

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

Issue 2188133002: Scroll with Layers in views::ScrollView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollTrack
Patch Set: DCHECK for no layer 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
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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 972
973 // The closest parent() ScrollView in the hierarchy enclosing this View. Null
974 // if there is none.
975 virtual ScrollView* EnclosingScrollView();
976
973 // The following methods are used by ScrollView to determine the amount 977 // 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 978 // 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 979 // return value of 10 indicates the scrollview should scroll 10 pixels in
976 // the appropriate direction. 980 // the appropriate direction.
977 // 981 //
978 // Each method takes the following parameters: 982 // Each method takes the following parameters:
979 // 983 //
980 // is_horizontal: if true, scrolling is along the horizontal axis, otherwise 984 // is_horizontal: if true, scrolling is along the horizontal axis, otherwise
981 // the vertical axis. 985 // the vertical axis.
982 // is_positive: if true, scrolling is by a positive amount. Along the 986 // is_positive: if true, scrolling is by a positive amount. Along the
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 // Belongs to this view, but it's reference-counted on some platforms 1573 // 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. 1574 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1571 NativeViewAccessibility* native_view_accessibility_; 1575 NativeViewAccessibility* native_view_accessibility_;
1572 1576
1573 DISALLOW_COPY_AND_ASSIGN(View); 1577 DISALLOW_COPY_AND_ASSIGN(View);
1574 }; 1578 };
1575 1579
1576 } // namespace views 1580 } // namespace views
1577 1581
1578 #endif // UI_VIEWS_VIEW_H_ 1582 #endif // UI_VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698