Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
|
sadrul
2016/11/18 19:07:51
No (c)
Sarmad Hashmi
2016/11/19 00:29:51
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_VIEWS_DEVTOOLS_OBSERVER_H_ | |
| 6 #define UI_VIEWS_DEVTOOLS_OBSERVER_H_ | |
| 7 | |
| 8 #include "ui/views/view.h" | |
| 9 #include "ui/views/views_export.h" | |
| 10 | |
| 11 namespace gfx { | |
| 12 class Rect; | |
| 13 } | |
| 14 | |
| 15 namespace views { | |
| 16 | |
| 17 // DevTools specific observer for View changes. | |
| 18 class VIEWS_EXPORT DevToolsObserver { | |
| 19 public: | |
| 20 // Called whenever target |view| is being moved. If |old_parent| is NULL, | |
| 21 // the target is being added. If the |new_parent| is NULL, then the target | |
| 22 // is being removed. | |
| 23 virtual void OnViewHierarchyChanged(View* target, | |
| 24 View* old_parent, | |
| 25 View* new_parent) {} | |
| 26 | |
| 27 virtual void OnViewVisibilityChanged(View* view, bool visible) {} | |
| 28 | |
| 29 virtual void OnViewEnabledChanged(View* view, int index) {} | |
| 30 | |
| 31 virtual void OnViewBoundsChanged(View* view, const gfx::Rect& new_bounds) {} | |
| 32 | |
| 33 // Invoked whenever a child is moved to another index. This is called on the | |
| 34 // parent view. |view| is the child view being reordered to the index. | |
| 35 virtual void OnChildViewReordered(View* view, int index) {} | |
| 36 | |
| 37 protected: | |
| 38 virtual ~DevToolsObserver() {} | |
| 39 }; | |
| 40 | |
| 41 } // namespace views | |
| 42 | |
| 43 #endif // UI_VIEWS_DEVTOOLS_OBSERVER_H_ | |
| OLD | NEW |