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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 // recurses through all children. This is used when adding a layer to an | 1104 // recurses through all children. This is used when adding a layer to an |
1105 // existing view to make sure all descendants that have layers are parented to | 1105 // existing view to make sure all descendants that have layers are parented to |
1106 // the right layer. | 1106 // the right layer. |
1107 void MoveLayerToParent(ui::Layer* parent_layer, const gfx::Point& point); | 1107 void MoveLayerToParent(ui::Layer* parent_layer, const gfx::Point& point); |
1108 | 1108 |
1109 // Called to update the bounds of any child layers within this View's | 1109 // Called to update the bounds of any child layers within this View's |
1110 // hierarchy when something happens to the hierarchy. | 1110 // hierarchy when something happens to the hierarchy. |
1111 void UpdateChildLayerBounds(const gfx::Vector2d& offset); | 1111 void UpdateChildLayerBounds(const gfx::Vector2d& offset); |
1112 | 1112 |
1113 // Overridden from ui::LayerDelegate: | 1113 // Overridden from ui::LayerDelegate: |
1114 void OnPaintLayer(gfx::Canvas* canvas) override; | 1114 void OnPaintLayer(const ui::PaintContext& context) override; |
1115 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override; | 1115 void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) override; |
1116 void OnDeviceScaleFactorChanged(float device_scale_factor) override; | 1116 void OnDeviceScaleFactorChanged(float device_scale_factor) override; |
1117 base::Closure PrepareForLayerBoundsChange() override; | 1117 base::Closure PrepareForLayerBoundsChange() override; |
1118 | 1118 |
1119 // Finds the layer that this view paints to (it may belong to an ancestor | 1119 // Finds the layer that this view paints to (it may belong to an ancestor |
1120 // view), then reorders the immediate children of that layer to match the | 1120 // view), then reorders the immediate children of that layer to match the |
1121 // order of the view tree. | 1121 // order of the view tree. |
1122 virtual void ReorderLayers(); | 1122 virtual void ReorderLayers(); |
1123 | 1123 |
1124 // This reorders the immediate children of |*parent_layer| to match the | 1124 // This reorders the immediate children of |*parent_layer| to match the |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 // Belongs to this view, but it's reference-counted on some platforms | 1564 // Belongs to this view, but it's reference-counted on some platforms |
1565 // so we can't use a scoped_ptr. It's dereferenced in the destructor. | 1565 // so we can't use a scoped_ptr. It's dereferenced in the destructor. |
1566 NativeViewAccessibility* native_view_accessibility_; | 1566 NativeViewAccessibility* native_view_accessibility_; |
1567 | 1567 |
1568 DISALLOW_COPY_AND_ASSIGN(View); | 1568 DISALLOW_COPY_AND_ASSIGN(View); |
1569 }; | 1569 }; |
1570 | 1570 |
1571 } // namespace views | 1571 } // namespace views |
1572 | 1572 |
1573 #endif // UI_VIEWS_VIEW_H_ | 1573 #endif // UI_VIEWS_VIEW_H_ |
OLD | NEW |