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 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1182 virtual void ReorderLayers(); | 1182 virtual void ReorderLayers(); |
1183 | 1183 |
1184 // This reorders the immediate children of |*parent_layer| to match the | 1184 // This reorders the immediate children of |*parent_layer| to match the |
1185 // order of the view tree. Child layers which are owned by a view are | 1185 // order of the view tree. Child layers which are owned by a view are |
1186 // reordered so that they are below any child layers not owned by a view. | 1186 // reordered so that they are below any child layers not owned by a view. |
1187 // Widget::ReorderNativeViews() should be called to reorder any child layers | 1187 // Widget::ReorderNativeViews() should be called to reorder any child layers |
1188 // with an associated view. Widget::ReorderNativeViews() may reorder layers | 1188 // with an associated view. Widget::ReorderNativeViews() may reorder layers |
1189 // below layers owned by a view. | 1189 // below layers owned by a view. |
1190 virtual void ReorderChildLayers(ui::Layer* parent_layer); | 1190 virtual void ReorderChildLayers(ui::Layer* parent_layer); |
1191 | 1191 |
1192 // Notifies parents about a change in a child layer. An example where a | |
sky
2017/04/17 15:24:01
Be explicit and say either the layer is being crea
ananta
2017/04/18 03:04:26
Done.
| |
1193 // subclass may override this method is when it wants to clip the child by | |
1194 // adding its own layer. | |
1195 virtual void OnChildLayerChanged(View* child) {} | |
sky
2017/04/17 15:24:01
Don't inline the implementation.
ananta
2017/04/18 03:04:26
Done.
| |
1196 | |
1192 // Input --------------------------------------------------------------------- | 1197 // Input --------------------------------------------------------------------- |
1193 | 1198 |
1194 virtual DragInfo* GetDragInfo(); | 1199 virtual DragInfo* GetDragInfo(); |
1195 | 1200 |
1196 // Focus --------------------------------------------------------------------- | 1201 // Focus --------------------------------------------------------------------- |
1197 | 1202 |
1198 // Returns last set focus behavior. | 1203 // Returns last set focus behavior. |
1199 FocusBehavior focus_behavior() const { return focus_behavior_; } | 1204 FocusBehavior focus_behavior() const { return focus_behavior_; } |
1200 | 1205 |
1201 // Override to be notified when focus has changed either to or from this View. | 1206 // Override to be notified when focus has changed either to or from this View. |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1670 // Observers ------------------------------------------------------------- | 1675 // Observers ------------------------------------------------------------- |
1671 | 1676 |
1672 base::ObserverList<ViewObserver> observers_; | 1677 base::ObserverList<ViewObserver> observers_; |
1673 | 1678 |
1674 DISALLOW_COPY_AND_ASSIGN(View); | 1679 DISALLOW_COPY_AND_ASSIGN(View); |
1675 }; | 1680 }; |
1676 | 1681 |
1677 } // namespace views | 1682 } // namespace views |
1678 | 1683 |
1679 #endif // UI_VIEWS_VIEW_H_ | 1684 #endif // UI_VIEWS_VIEW_H_ |
OLD | NEW |