OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview Utility functions for the Bookmarks page. | 6 * @fileoverview Utility functions for the Bookmarks page. |
7 */ | 7 */ |
8 | 8 |
9 cr.define('bookmarks.util', function() { | 9 cr.define('bookmarks.util', function() { |
10 /** | 10 /** |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 }); | 61 }); |
62 } | 62 } |
63 | 63 |
64 return nodeMap; | 64 return nodeMap; |
65 } | 65 } |
66 | 66 |
67 /** @return {!BookmarksPageState} */ | 67 /** @return {!BookmarksPageState} */ |
68 function createEmptyState() { | 68 function createEmptyState() { |
69 return { | 69 return { |
70 nodes: {}, | 70 nodes: {}, |
71 selectedFolder: '0', | 71 selectedFolder: BOOKMARKS_BAR_ID, |
72 closedFolders: new Set(), | 72 closedFolders: new Set(), |
73 prefs: { | 73 prefs: { |
74 canEdit: true, | 74 canEdit: true, |
75 incognitoAvailability: IncognitoAvailability.ENABLED, | 75 incognitoAvailability: IncognitoAvailability.ENABLED, |
76 }, | 76 }, |
77 search: { | 77 search: { |
78 term: '', | 78 term: '', |
79 inProgress: false, | 79 inProgress: false, |
80 results: [], | 80 results: [], |
81 }, | 81 }, |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 getDescendants: getDescendants, | 200 getDescendants: getDescendants, |
201 getDisplayedList: getDisplayedList, | 201 getDisplayedList: getDisplayedList, |
202 hasChildFolders: hasChildFolders, | 202 hasChildFolders: hasChildFolders, |
203 isShowingSearch: isShowingSearch, | 203 isShowingSearch: isShowingSearch, |
204 normalizeNode: normalizeNode, | 204 normalizeNode: normalizeNode, |
205 normalizeNodes: normalizeNodes, | 205 normalizeNodes: normalizeNodes, |
206 removeIdsFromMap: removeIdsFromMap, | 206 removeIdsFromMap: removeIdsFromMap, |
207 removeIdsFromSet: removeIdsFromSet, | 207 removeIdsFromSet: removeIdsFromSet, |
208 }; | 208 }; |
209 }); | 209 }); |
OLD | NEW |