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

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

Issue 2823053003: [MD Bookmarks] Remove the bookmarks-sidebar element. (Closed)
Patch Set: rebase, address comments Created 3 years, 7 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 }); 57 });
58 58
59 this.updateFromStore(); 59 this.updateFromStore();
60 }, 60 },
61 61
62 /** @return {HTMLElement} */ 62 /** @return {HTMLElement} */
63 getDropTarget: function() { 63 getDropTarget: function() {
64 return this.$.container; 64 return this.$.container;
65 }, 65 },
66 66
67 /** @return {boolean} */
68 isTopLevelFolder_: function() {
69 return this.depth == 0;
70 },
71
67 /** 72 /**
68 * @private 73 * @private
69 * @return {string} 74 * @return {string}
70 */ 75 */
71 getFolderIcon_: function() { 76 getFolderIcon_: function() {
72 return this.isSelectedFolder_ ? 'bookmarks:folder-open' : 'cr:folder'; 77 return this.isSelectedFolder_ ? 'bookmarks:folder-open' : 'cr:folder';
73 }, 78 },
74 79
75 /** @private */ 80 /** @private */
76 selectFolder_: function() { 81 selectFolder_: function() {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 */ 131 */
127 isFolder_: function(itemId) { 132 isFolder_: function(itemId) {
128 return !this.getState().nodes[itemId].url; 133 return !this.getState().nodes[itemId].url;
129 }, 134 },
130 135
131 /** 136 /**
132 * @private 137 * @private
133 * @return {boolean} 138 * @return {boolean}
134 */ 139 */
135 isRootFolder_: function() { 140 isRootFolder_: function() {
136 return this.depth == 0; 141 return this.itemId == ROOT_NODE_ID;
137 }, 142 },
138 }); 143 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/folder_node.html ('k') | chrome/browser/resources/md_bookmarks/sidebar.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698