| 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 <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 // to scroll. ScrollView interprets a return value of 0 (or negative) | 988 // to scroll. ScrollView interprets a return value of 0 (or negative) |
| 989 // to scroll by a default amount. | 989 // to scroll by a default amount. |
| 990 // | 990 // |
| 991 // See VariableRowHeightScrollHelper and FixedRowHeightScrollHelper for | 991 // See VariableRowHeightScrollHelper and FixedRowHeightScrollHelper for |
| 992 // implementations of common cases. | 992 // implementations of common cases. |
| 993 virtual int GetPageScrollIncrement(ScrollView* scroll_view, | 993 virtual int GetPageScrollIncrement(ScrollView* scroll_view, |
| 994 bool is_horizontal, bool is_positive); | 994 bool is_horizontal, bool is_positive); |
| 995 virtual int GetLineScrollIncrement(ScrollView* scroll_view, | 995 virtual int GetLineScrollIncrement(ScrollView* scroll_view, |
| 996 bool is_horizontal, bool is_positive); | 996 bool is_horizontal, bool is_positive); |
| 997 | 997 |
| 998 // Anchored popup ------------------------------------------------------------ |
| 999 // Called when a bubble that is anchored on this View is closing. |
| 1000 virtual void OnBubbleClosing() {} |
| 1001 |
| 998 protected: | 1002 protected: |
| 999 // Used to track a drag. RootView passes this into | 1003 // Used to track a drag. RootView passes this into |
| 1000 // ProcessMousePressed/Dragged. | 1004 // ProcessMousePressed/Dragged. |
| 1001 struct DragInfo { | 1005 struct DragInfo { |
| 1002 // Sets possible_drag to false and start_x/y to 0. This is invoked by | 1006 // Sets possible_drag to false and start_x/y to 0. This is invoked by |
| 1003 // RootView prior to invoke ProcessMousePressed. | 1007 // RootView prior to invoke ProcessMousePressed. |
| 1004 void Reset(); | 1008 void Reset(); |
| 1005 | 1009 |
| 1006 // Sets possible_drag to true and start_pt to the specified point. | 1010 // Sets possible_drag to true and start_pt to the specified point. |
| 1007 // This is invoked by the target view if it detects the press may generate | 1011 // This is invoked by the target view if it detects the press may generate |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1567 // Belongs to this view, but it's reference-counted on some platforms | 1571 // Belongs to this view, but it's reference-counted on some platforms |
| 1568 // so we can't use a scoped_ptr. It's dereferenced in the destructor. | 1572 // so we can't use a scoped_ptr. It's dereferenced in the destructor. |
| 1569 NativeViewAccessibility* native_view_accessibility_; | 1573 NativeViewAccessibility* native_view_accessibility_; |
| 1570 | 1574 |
| 1571 DISALLOW_COPY_AND_ASSIGN(View); | 1575 DISALLOW_COPY_AND_ASSIGN(View); |
| 1572 }; | 1576 }; |
| 1573 | 1577 |
| 1574 } // namespace views | 1578 } // namespace views |
| 1575 | 1579 |
| 1576 #endif // UI_VIEWS_VIEW_H_ | 1580 #endif // UI_VIEWS_VIEW_H_ |
| OLD | NEW |