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 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1286 | 1286 |
1287 // Size and disposition ------------------------------------------------------ | 1287 // Size and disposition ------------------------------------------------------ |
1288 | 1288 |
1289 // Call VisibilityChanged() recursively for all children. | 1289 // Call VisibilityChanged() recursively for all children. |
1290 void PropagateVisibilityNotifications(View* from, bool is_visible); | 1290 void PropagateVisibilityNotifications(View* from, bool is_visible); |
1291 | 1291 |
1292 // Registers/unregisters accelerators as necessary and calls | 1292 // Registers/unregisters accelerators as necessary and calls |
1293 // VisibilityChanged(). | 1293 // VisibilityChanged(). |
1294 void VisibilityChangedImpl(View* starting_from, bool is_visible); | 1294 void VisibilityChangedImpl(View* starting_from, bool is_visible); |
1295 | 1295 |
| 1296 // Called when the logical or just the mirrored bounds have changed. Note: |
| 1297 // |previous_bounds| may be the same as |bounds_| if the logical bounds have |
| 1298 // not changed, but the mirrored bounds have. |
| 1299 void MirroredBoundsChanged(const gfx::Rect& previous_bounds); |
| 1300 |
1296 // Responsible for propagating bounds change notifications to relevant | 1301 // Responsible for propagating bounds change notifications to relevant |
1297 // views. | 1302 // views. Called only if the actual (logical) bounds have changed (not just if |
| 1303 // the mirrored bounds have changed due to a parent's size changing). |
1298 void BoundsChanged(const gfx::Rect& previous_bounds); | 1304 void BoundsChanged(const gfx::Rect& previous_bounds); |
1299 | 1305 |
1300 // Visible bounds notification registration. | 1306 // Visible bounds notification registration. |
1301 // When a view is added to a hierarchy, it and all its children are asked if | 1307 // When a view is added to a hierarchy, it and all its children are asked if |
1302 // they need to be registered for "visible bounds within root" notifications | 1308 // they need to be registered for "visible bounds within root" notifications |
1303 // (see comment on OnVisibleBoundsChanged()). If they do, they are registered | 1309 // (see comment on OnVisibleBoundsChanged()). If they do, they are registered |
1304 // with every ancestor between them and the root of the hierarchy. | 1310 // with every ancestor between them and the root of the hierarchy. |
1305 static void RegisterChildrenForVisibleBoundsNotification(View* view); | 1311 static void RegisterChildrenForVisibleBoundsNotification(View* view); |
1306 static void UnregisterChildrenForVisibleBoundsNotification(View* view); | 1312 static void UnregisterChildrenForVisibleBoundsNotification(View* view); |
1307 void RegisterForVisibleBoundsNotification(); | 1313 void RegisterForVisibleBoundsNotification(); |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 // Belongs to this view, but it's reference-counted on some platforms | 1606 // Belongs to this view, but it's reference-counted on some platforms |
1601 // so we can't use a scoped_ptr. It's dereferenced in the destructor. | 1607 // so we can't use a scoped_ptr. It's dereferenced in the destructor. |
1602 NativeViewAccessibility* native_view_accessibility_; | 1608 NativeViewAccessibility* native_view_accessibility_; |
1603 | 1609 |
1604 DISALLOW_COPY_AND_ASSIGN(View); | 1610 DISALLOW_COPY_AND_ASSIGN(View); |
1605 }; | 1611 }; |
1606 | 1612 |
1607 } // namespace views | 1613 } // namespace views |
1608 | 1614 |
1609 #endif // UI_VIEWS_VIEW_H_ | 1615 #endif // UI_VIEWS_VIEW_H_ |
OLD | NEW |