Chromium Code Reviews| Index: ui/views/devtools_observer.h |
| diff --git a/ui/views/devtools_observer.h b/ui/views/devtools_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..20242b887c8e094b3452478521fbed59fa4575cc |
| --- /dev/null |
| +++ b/ui/views/devtools_observer.h |
| @@ -0,0 +1,43 @@ |
| +// 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.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_VIEWS_DEVTOOLS_OBSERVER_H_ |
| +#define UI_VIEWS_DEVTOOLS_OBSERVER_H_ |
| + |
| +#include "ui/views/view.h" |
| +#include "ui/views/views_export.h" |
| + |
| +namespace gfx { |
| +class Rect; |
| +} |
| + |
| +namespace views { |
| + |
| +// DevTools specific observer for View changes. |
| +class VIEWS_EXPORT DevToolsObserver { |
| + public: |
| + // Called whenever target |view| is being moved. If |old_parent| is NULL, |
| + // the target is being added. If the |new_parent| is NULL, then the target |
| + // is being removed. |
| + virtual void OnViewHierarchyChanged(View* target, |
| + View* old_parent, |
| + View* new_parent) {} |
| + |
| + virtual void OnViewVisibilityChanged(View* view, bool visible) {} |
| + |
| + virtual void OnViewEnabledChanged(View* view, int index) {} |
| + |
| + virtual void OnViewBoundsChanged(View* view, const gfx::Rect& new_bounds) {} |
| + |
| + // Invoked whenever a child is moved to another index. This is called on the |
| + // parent view. |view| is the child view being reordered to the index. |
| + virtual void OnChildViewReordered(View* view, int index) {} |
| + |
| + protected: |
| + virtual ~DevToolsObserver() {} |
| +}; |
| + |
| +} // namespace views |
| + |
| +#endif // UI_VIEWS_DEVTOOLS_OBSERVER_H_ |