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

Side by Side Diff: chrome/browser/resources/md_bookmarks/folder_node.js

Issue 2774233006: [MD Bookmarks] Change selection items from Map to Set. (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Polymer({ 5 Polymer({
6 is: 'bookmarks-folder-node', 6 is: 'bookmarks-folder-node',
7 7
8 behaviors: [ 8 behaviors: [
9 bookmarks.StoreClient, 9 bookmarks.StoreClient,
10 ], 10 ],
(...skipping 26 matching lines...) Expand all
37 computed: 'computeIsSelected_(itemId, selectedFolder_)' 37 computed: 'computeIsSelected_(itemId, selectedFolder_)'
38 }, 38 },
39 }, 39 },
40 40
41 /** @override */ 41 /** @override */
42 attached: function() { 42 attached: function() {
43 this.watch('item_', function(state) { 43 this.watch('item_', function(state) {
44 return state.nodes[this.itemId]; 44 return state.nodes[this.itemId];
45 }.bind(this)); 45 }.bind(this));
46 this.watch('isClosed_', function(state) { 46 this.watch('isClosed_', function(state) {
47 return !!state.closedFolders[this.itemId]; 47 return state.closedFolders.has(this.itemId);
48 }.bind(this)); 48 }.bind(this));
49 this.watch('selectedFolder_', function(state) { 49 this.watch('selectedFolder_', function(state) {
50 return state.selectedFolder; 50 return state.selectedFolder;
51 }); 51 });
52 52
53 this.updateFromStore(); 53 this.updateFromStore();
54 }, 54 },
55 55
56 /** @return {HTMLElement} */ 56 /** @return {HTMLElement} */
57 getDropTarget: function() { 57 getDropTarget: function() {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 }, 123 },
124 124
125 /** 125 /**
126 * @private 126 * @private
127 * @return {boolean} 127 * @return {boolean}
128 */ 128 */
129 isRootFolder_: function() { 129 isRootFolder_: function() {
130 return this.depth == 0; 130 return this.depth == 0;
131 }, 131 },
132 }); 132 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/dnd_manager.js ('k') | chrome/browser/resources/md_bookmarks/item.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698