| 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 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1106 // Updates the view's layer's parent. Called when a view is added to a view | 1106 // Updates the view's layer's parent. Called when a view is added to a view |
| 1107 // hierarchy, responsible for parenting the view's layer to the enclosing | 1107 // hierarchy, responsible for parenting the view's layer to the enclosing |
| 1108 // layer in the hierarchy. | 1108 // layer in the hierarchy. |
| 1109 virtual void UpdateParentLayer(); | 1109 virtual void UpdateParentLayer(); |
| 1110 | 1110 |
| 1111 // If this view has a layer, the layer is reparented to |parent_layer| and its | 1111 // If this view has a layer, the layer is reparented to |parent_layer| and its |
| 1112 // bounds is set based on |point|. If this view does not have a layer, then | 1112 // bounds is set based on |point|. If this view does not have a layer, then |
| 1113 // recurses through all children. This is used when adding a layer to an | 1113 // recurses through all children. This is used when adding a layer to an |
| 1114 // existing view to make sure all descendants that have layers are parented to | 1114 // existing view to make sure all descendants that have layers are parented to |
| 1115 // the right layer. | 1115 // the right layer. |
| 1116 virtual void MoveLayerToParent(ui::Layer* parent_layer, | 1116 void MoveLayerToParent(ui::Layer* parent_layer, const gfx::Point& point); |
| 1117 const gfx::Point& point); | |
| 1118 | 1117 |
| 1119 // Called to update the bounds of any child layers within this View's | 1118 // Called to update the bounds of any child layers within this View's |
| 1120 // hierarchy when something happens to the hierarchy. | 1119 // hierarchy when something happens to the hierarchy. |
| 1121 virtual void UpdateChildLayerBounds(const gfx::Vector2d& offset); | 1120 void UpdateChildLayerBounds(const gfx::Vector2d& offset); |
| 1122 | 1121 |
| 1123 // Overridden from ui::LayerDelegate: | 1122 // Overridden from ui::LayerDelegate: |
| 1124 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; | 1123 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; |
| 1125 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 1124 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
| 1126 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE; | 1125 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE; |
| 1127 | 1126 |
| 1128 // Finds the layer that this view paints to (it may belong to an ancestor | 1127 // Finds the layer that this view paints to (it may belong to an ancestor |
| 1129 // view), then reorders the immediate children of that layer to match the | 1128 // view), then reorders the immediate children of that layer to match the |
| 1130 // order of the view tree. | 1129 // order of the view tree. |
| 1131 virtual void ReorderLayers(); | 1130 virtual void ReorderLayers(); |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1574 // 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 |
| 1575 // 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. |
| 1576 NativeViewAccessibility* native_view_accessibility_; | 1575 NativeViewAccessibility* native_view_accessibility_; |
| 1577 | 1576 |
| 1578 DISALLOW_COPY_AND_ASSIGN(View); | 1577 DISALLOW_COPY_AND_ASSIGN(View); |
| 1579 }; | 1578 }; |
| 1580 | 1579 |
| 1581 } // namespace views | 1580 } // namespace views |
| 1582 | 1581 |
| 1583 #endif // UI_VIEWS_VIEW_H_ | 1582 #endif // UI_VIEWS_VIEW_H_ |
| OLD | NEW |