Index: ui/views/view.h |
diff --git a/ui/views/view.h b/ui/views/view.h |
index fcbee85c1bf2155eef7639c5b96e75c6980c1b4f..ed05c92419b5202901bec530942c186e63cc76e1 100644 |
--- a/ui/views/view.h |
+++ b/ui/views/view.h |
@@ -1116,6 +1116,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, |
// FocusManager manages this view. |
virtual void NativeViewHierarchyChanged(); |
+ // This method is invoked for a view when it is attached to a hierarchy with |
+ // a widget, i.e. GetWidget() starts returning a non-null result. |
+ virtual void AddedToWidget(); |
+ |
+ // This method is invoked for a view when it is removed from a hierarchy with |
+ // a widget. |
+ virtual void RemovedFromWidget(); |
+ |
// Painting ------------------------------------------------------------------ |
// Responsible for calling Paint() on child Views. Override to control the |
@@ -1315,6 +1323,12 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, |
// Invokes OnNativeThemeChanged() on this and all descendants. |
void PropagateNativeThemeChanged(const ui::NativeTheme* theme); |
+ // Invokes AddedToWidget() on this and all descendants. |
+ void PropagateAddedToWidget(); |
+ |
+ // Invokes RemovedFromWidget() on this and all descendants. |
+ void PropagateRemovedFromWidget(); |
+ |
// Size and disposition ------------------------------------------------------ |
// Call VisibilityChanged() recursively for all children. |