| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |