|
[NTP Client] Split TreeNode#init into SetParent and SetChildren
Unties Node construction with the initialisation of their parent and
children. This allows controlling when the notifications about child
modifications are propagated, and simplifies the initialisation order.
The InnerNode#setParent() call is now what enables the notifications
and is done as the last step of the NewTabPageAdapter constructor.
ChildNode and InnerNode share almost all of the logic related to
managing the tree and their implementations make use of that without
specific modifications.
This also fixes some bugs related to resetting the section list.
BUG= 616090, 674023
Committed: https://crrev.com/d3007605eb84788e2d02efc395509ad449f3c035
Cr-Commit-Position: refs/heads/master@{#439489}
Total comments: 13
Total comments: 2
Total comments: 1
Total comments: 14
Total comments: 6
Total comments: 3
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+221 lines, -203 lines) |
Patch |
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ActionItem.java
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/AllDismissedItem.java
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ChildNode.java
|
View
|
1
2
3
4
5
6
|
1 chunk |
+11 lines, -8 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/Footer.java
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/InnerNode.java
|
View
|
1
2
3
4
5
6
7
10
|
3 chunks |
+62 lines, -36 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/Leaf.java
|
View
|
1
|
2 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java
|
View
|
1
2
3
4
5
6
7
|
5 chunks |
+9 lines, -21 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/OptionalLeaf.java
|
View
|
|
1 chunk |
+0 lines, -8 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ProgressItem.java
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SectionList.java
|
View
|
1
2
3
10
|
5 chunks |
+13 lines, -23 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SignInPromo.java
|
View
|
1
2
3
|
2 chunks |
+1 line, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SpacingItem.java
|
View
|
1
2
3
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusItem.java
|
View
|
|
1 chunk |
+4 lines, -10 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSection.java
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+7 lines, -28 lines |
0 comments
|
Download
|
 |
M |
chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/TreeNode.java
|
View
|
1
2
3
|
2 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/InnerNodeTest.java
|
View
|
1
2
3
4
5
6
7
8
9
|
4 chunks |
+105 lines, -36 lines |
0 comments
|
Download
|
 |
M |
chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/SuggestionsSectionTest.java
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 49 (34 generated)
|