| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_OBSERVER_H_ | 5 #ifndef UI_VIEWS_VIEW_OBSERVER_H_ |
| 6 #define UI_VIEWS_VIEW_OBSERVER_H_ | 6 #define UI_VIEWS_VIEW_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "ui/views/views_export.h" | 8 #include "ui/views/views_export.h" |
| 9 | 9 |
| 10 namespace views { | 10 namespace views { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // Called when View::SetEnabled() is called with a new value. | 28 // Called when View::SetEnabled() is called with a new value. |
| 29 virtual void OnViewEnabledChanged(View* observed_view) {} | 29 virtual void OnViewEnabledChanged(View* observed_view) {} |
| 30 | 30 |
| 31 // Called when the bounds of |observed_view| change. | 31 // Called when the bounds of |observed_view| change. |
| 32 virtual void OnViewBoundsChanged(View* observed_view) {} | 32 virtual void OnViewBoundsChanged(View* observed_view) {} |
| 33 | 33 |
| 34 // Called when a child is reordered among its siblings, specifically | 34 // Called when a child is reordered among its siblings, specifically |
| 35 // View::ReorderChildView() is called on |observed_view|. | 35 // View::ReorderChildView() is called on |observed_view|. |
| 36 virtual void OnChildViewReordered(View* observed_view, View* child) {} | 36 virtual void OnChildViewReordered(View* observed_view, View* child) {} |
| 37 | 37 |
| 38 // Called when the active NativeTheme has changed for |observed_view|. | |
| 39 virtual void OnViewNativeThemeChanged(View* observed_view) {} | |
| 40 | |
| 41 // Called from ~View. | 38 // Called from ~View. |
| 42 virtual void OnViewIsDeleting(View* observed_view) {} | 39 virtual void OnViewIsDeleting(View* observed_view) {} |
| 43 | 40 |
| 44 protected: | 41 protected: |
| 45 virtual ~ViewObserver() {} | 42 virtual ~ViewObserver() {} |
| 46 }; | 43 }; |
| 47 | 44 |
| 48 } // namespace views | 45 } // namespace views |
| 49 | 46 |
| 50 #endif // UI_VIEWS_VIEW_OBSERVER_H_ | 47 #endif // UI_VIEWS_VIEW_OBSERVER_H_ |
| OLD | NEW |