Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Issue 2500623002: Add ViewObserver to View for view updates (Closed)

Created:
4 years, 1 month ago by Sarmad Hashmi
Modified:
4 years, 1 month ago
Reviewers:
sadrul, sky
CC:
chromium-reviews, tfarina, pfeldman, devtools-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add ViewObserver to View for view updates - OnViewParentChanged for whenever a view is added/removed - OnViewVisibilityChanged, OnViewEnabledChanged, OnViewBoundsChanged are all for attribute changes - OnViewChildReordered for whenever a view is reordered within its parent Future CLs will allow devtools for listen to view changes and push them to the inspector. BUG=648701 Committed: https://crrev.com/7d1faa6c9ea5f4d5a2c10414d8a33b75a9f190e7 Cr-Commit-Position: refs/heads/master@{#434026}

Patch Set 1 #

Patch Set 2 : Add DevToolsobserver to View for view updates #

Total comments: 8

Patch Set 3 : sadruls comments #

Patch Set 4 : sadruls comments #

Total comments: 1

Patch Set 5 : Ensure single call of OnViewHierarchyChanged #

Total comments: 2

Patch Set 6 : sadruls comments #

Patch Set 7 : sadruls comments #

Total comments: 11

Patch Set 8 : skys comments #

Patch Set 9 : skys comments #

Total comments: 21

Patch Set 10 : skys comments #

Patch Set 11 : skys comments #

Total comments: 4

Patch Set 12 : skys comments #

Patch Set 13 : Change OnViewParentChanged to OnChildViewAdded/Removed #

Total comments: 2

Patch Set 14 : Moved NotifyChildView* impl to call location #

Patch Set 15 : Remove Rect forward declaration and view.h include #

Unified diffs Side-by-side diffs Delta from patch set Stats (+244 lines, -0 lines) Patch
M ui/views/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +9 lines, -0 lines 0 comments Download
M ui/views/view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +33 lines, -0 lines 0 comments Download
A ui/views/view_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +42 lines, -0 lines 0 comments Download
M ui/views/view_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +159 lines, -0 lines 0 comments Download

Messages

Total messages: 81 (58 generated)
Sarmad Hashmi
PTAL sadrul@
4 years, 1 month ago (2016-11-12 09:03:41 UTC) #8
sadrul
https://codereview.chromium.org/2500623002/diff/20001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/2500623002/diff/20001/ui/views/view.cc#newcode123 ui/views/view.cc:123: devtools_observer_(NULL) { nullptr https://codereview.chromium.org/2500623002/diff/20001/ui/views/view.cc#newcode1898 ui/views/view.cc:1898: devtools_observer_->OnViewHierarchyChanged(this, details); Is this ...
4 years, 1 month ago (2016-11-15 17:21:49 UTC) #9
Sarmad Hashmi
https://codereview.chromium.org/2500623002/diff/20001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/2500623002/diff/20001/ui/views/view.cc#newcode123 ui/views/view.cc:123: devtools_observer_(NULL) { On 2016/11/15 17:21:49, sadrul wrote: > nullptr ...
4 years, 1 month ago (2016-11-15 17:54:56 UTC) #12
sadrul
https://codereview.chromium.org/2500623002/diff/60001/ui/views/view_unittest.cc File ui/views/view_unittest.cc (right): https://codereview.chromium.org/2500623002/diff/60001/ui/views/view_unittest.cc#newcode4678 ui/views/view_unittest.cc:4678: EXPECT_EQ(2, views_hierarchy_changed_times()); Does this need to be called twice? ...
4 years, 1 month ago (2016-11-16 18:35:23 UTC) #17
Sarmad Hashmi
As discussed, added OnViewHierarchyChanged call under AddChildViewAt and DoRemoveChildView.
4 years, 1 month ago (2016-11-16 20:52:27 UTC) #19
sadrul
+sky@ lgtm, but please wait for approval from sky@ too. https://codereview.chromium.org/2500623002/diff/80001/ui/views/devtools_observer.h File ui/views/devtools_observer.h (right): https://codereview.chromium.org/2500623002/diff/80001/ui/views/devtools_observer.h#newcode1 ...
4 years, 1 month ago (2016-11-18 19:07:51 UTC) #24
Sarmad Hashmi
https://codereview.chromium.org/2500623002/diff/80001/ui/views/devtools_observer.h File ui/views/devtools_observer.h (right): https://codereview.chromium.org/2500623002/diff/80001/ui/views/devtools_observer.h#newcode1 ui/views/devtools_observer.h:1: // Copyright (c) 2016 The Chromium Authors. All rights ...
4 years, 1 month ago (2016-11-19 00:29:51 UTC) #28
sky
https://codereview.chromium.org/2500623002/diff/120001/ui/views/devtools_observer.h File ui/views/devtools_observer.h (right): https://codereview.chromium.org/2500623002/diff/120001/ui/views/devtools_observer.h#newcode18 ui/views/devtools_observer.h:18: class VIEWS_EXPORT DevToolsObserver { I don't think there is ...
4 years, 1 month ago (2016-11-19 00:46:31 UTC) #30
Sarmad Hashmi
https://codereview.chromium.org/2500623002/diff/120001/ui/views/devtools_observer.h File ui/views/devtools_observer.h (right): https://codereview.chromium.org/2500623002/diff/120001/ui/views/devtools_observer.h#newcode18 ui/views/devtools_observer.h:18: class VIEWS_EXPORT DevToolsObserver { On 2016/11/19 00:46:31, sky wrote: ...
4 years, 1 month ago (2016-11-20 06:47:08 UTC) #37
sky
https://codereview.chromium.org/2500623002/diff/160001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/2500623002/diff/160001/ui/views/view.cc#newcode254 ui/views/view.cc:254: observer.OnChildViewReordered(view, index); Is index really useful for this notification? ...
4 years, 1 month ago (2016-11-21 16:33:38 UTC) #40
Sarmad Hashmi
https://codereview.chromium.org/2500623002/diff/160001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/2500623002/diff/160001/ui/views/view.cc#newcode254 ui/views/view.cc:254: observer.OnChildViewReordered(view, index); On 2016/11/21 16:33:37, sky wrote: > Is ...
4 years, 1 month ago (2016-11-21 17:09:54 UTC) #42
sadrul
https://codereview.chromium.org/2500623002/diff/120001/ui/views/devtools_observer.h File ui/views/devtools_observer.h (right): https://codereview.chromium.org/2500623002/diff/120001/ui/views/devtools_observer.h#newcode18 ui/views/devtools_observer.h:18: class VIEWS_EXPORT DevToolsObserver { On 2016/11/19 00:46:31, sky wrote: ...
4 years, 1 month ago (2016-11-21 18:07:34 UTC) #44
sky
On Mon, Nov 21, 2016 at 10:07 AM, <sadrul@chromium.org> wrote: > > https://codereview.chromium.org/2500623002/diff/120001/ui/views/devtools_observer.h > File ...
4 years, 1 month ago (2016-11-21 18:20:40 UTC) #45
sky
https://codereview.chromium.org/2500623002/diff/160001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/2500623002/diff/160001/ui/views/view.cc#newcode1880 ui/views/view.cc:1880: NotifyViewParentChanged(view, this, nullptr); On 2016/11/21 17:09:53, Sarmad Hashmi wrote: ...
4 years, 1 month ago (2016-11-21 18:32:12 UTC) #48
Sarmad Hashmi
Sorry, misunderstood what you said first. Passed |parent| to OnViewParentChanged now but since we don't ...
4 years, 1 month ago (2016-11-21 19:14:13 UTC) #49
Sarmad Hashmi
PTAL sky@. Added OnChildViewRemoved/Added as discussed.
4 years, 1 month ago (2016-11-22 01:32:07 UTC) #55
sky
https://codereview.chromium.org/2500623002/diff/240001/ui/views/view.h File ui/views/view.h (right): https://codereview.chromium.org/2500623002/diff/240001/ui/views/view.h#newcode1445 ui/views/view.h:1445: void NotifyChildViewAdded(View* child); You only call these functions from ...
4 years, 1 month ago (2016-11-22 04:40:48 UTC) #59
Sarmad Hashmi
https://codereview.chromium.org/2500623002/diff/240001/ui/views/view.h File ui/views/view.h (right): https://codereview.chromium.org/2500623002/diff/240001/ui/views/view.h#newcode1445 ui/views/view.h:1445: void NotifyChildViewAdded(View* child); On 2016/11/22 04:40:48, sky wrote: > ...
4 years, 1 month ago (2016-11-22 04:47:00 UTC) #61
sky
LGTM
4 years, 1 month ago (2016-11-22 20:06:19 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2500623002/260001
4 years, 1 month ago (2016-11-22 20:07:06 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2500623002/280001
4 years, 1 month ago (2016-11-22 23:35:41 UTC) #76
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 1 month ago (2016-11-22 23:53:49 UTC) #79
commit-bot: I haz the power
4 years, 1 month ago (2016-11-22 23:55:22 UTC) #81
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/7d1faa6c9ea5f4d5a2c10414d8a33b75a9f190e7
Cr-Commit-Position: refs/heads/master@{#434026}

Powered by Google App Engine
This is Rietveld 408576698