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

Side by Side Diff: chrome/browser/resources/md_bookmarks/item.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-item', 6 is: 'bookmarks-item',
7 7
8 behaviors: [ 8 behaviors: [
9 bookmarks.StoreClient, 9 bookmarks.StoreClient,
10 ], 10 ],
(...skipping 28 matching lines...) Expand all
39 'click': 'onClick_', 39 'click': 'onClick_',
40 'dblclick': 'onDblClick_', 40 'dblclick': 'onDblClick_',
41 }, 41 },
42 42
43 /** @override */ 43 /** @override */
44 attached: function() { 44 attached: function() {
45 this.watch('item_', function(store) { 45 this.watch('item_', function(store) {
46 return store.nodes[this.itemId]; 46 return store.nodes[this.itemId];
47 }.bind(this)); 47 }.bind(this));
48 this.watch('isSelectedItem_', function(store) { 48 this.watch('isSelectedItem_', function(store) {
49 return !!store.selection.items[this.itemId]; 49 return !!store.selection.items.has(this.itemId);
50 }.bind(this)); 50 }.bind(this));
51 51
52 this.updateFromStore(); 52 this.updateFromStore();
53 }, 53 },
54 54
55 /** @return {BookmarksItemElement} */ 55 /** @return {BookmarksItemElement} */
56 getDropTarget: function() { 56 getDropTarget: function() {
57 return this; 57 return this;
58 }, 58 },
59 59
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 }, 104 },
105 105
106 /** 106 /**
107 * @param {string} url 107 * @param {string} url
108 * @private 108 * @private
109 */ 109 */
110 updateFavicon_: function(url) { 110 updateFavicon_: function(url) {
111 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url); 111 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url);
112 }, 112 },
113 }); 113 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/folder_node.js ('k') | chrome/browser/resources/md_bookmarks/reducers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698