| Index: ui/views/view.cc
|
| diff --git a/ui/views/view.cc b/ui/views/view.cc
|
| index b6cd9d0e97f9345128f754a62f0b80e15fa2430f..ef57d1d0ae5a3065cabb398a2190062c8ec9ed82 100644
|
| --- a/ui/views/view.cc
|
| +++ b/ui/views/view.cc
|
| @@ -48,6 +48,7 @@
|
| #include "ui/views/background.h"
|
| #include "ui/views/border.h"
|
| #include "ui/views/context_menu_controller.h"
|
| +#include "ui/views/devtools_observer.h"
|
| #include "ui/views/drag_controller.h"
|
| #include "ui/views/focus/view_storage.h"
|
| #include "ui/views/layout/layout_manager.h"
|
| @@ -118,7 +119,8 @@ View::View()
|
| focus_behavior_(FocusBehavior::NEVER),
|
| context_menu_controller_(NULL),
|
| drag_controller_(NULL),
|
| - native_view_accessibility_(NULL) {
|
| + native_view_accessibility_(NULL),
|
| + devtools_observer_(nullptr) {
|
| SetTargetHandler(this);
|
| }
|
|
|
| @@ -243,6 +245,9 @@ void View::ReorderChildView(View* view, int index) {
|
| if (next_focusable)
|
| next_focusable->previous_focusable_view_ = prev_focusable;
|
|
|
| + if (devtools_observer_)
|
| + devtools_observer_->OnChildViewReordered(view, index);
|
| +
|
| // Add it in the specified index now.
|
| InitFocusSiblings(view, index);
|
| children_.insert(children_.begin() + index, view);
|
| @@ -295,6 +300,9 @@ void View::SetBoundsRect(const gfx::Rect& bounds) {
|
| SCHEDULE_PAINT_SIZE_CHANGED);
|
| }
|
|
|
| + if (devtools_observer_)
|
| + devtools_observer_->OnViewBoundsChanged(this, bounds);
|
| +
|
| gfx::Rect prev = bounds_;
|
| bounds_ = bounds;
|
| BoundsChanged(prev);
|
| @@ -436,6 +444,8 @@ void View::SetEnabled(bool enabled) {
|
| if (enabled != enabled_) {
|
| enabled_ = enabled;
|
| AdvanceFocusIfNecessary();
|
| + if (devtools_observer_)
|
| + devtools_observer_->OnViewEnabledChanged(this, enabled);
|
| OnEnabledChanged();
|
| }
|
| }
|
| @@ -1878,6 +1888,8 @@ void View::ViewHierarchyChangedImpl(
|
| }
|
| }
|
|
|
| + if (devtools_observer_)
|
| + devtools_observer_->OnViewHierarchyChanged(this, details);
|
| ViewHierarchyChanged(details);
|
| details.parent->needs_layout_ = true;
|
| }
|
| @@ -1897,6 +1909,8 @@ void View::PropagateVisibilityNotifications(View* start, bool is_visible) {
|
| }
|
|
|
| void View::VisibilityChangedImpl(View* starting_from, bool is_visible) {
|
| + if (devtools_observer_)
|
| + devtools_observer_->OnViewVisibilityChanged(starting_from, is_visible);
|
| VisibilityChanged(starting_from, is_visible);
|
| }
|
|
|
|
|