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

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

Issue 2639893006: [MD Bookmarks] Add lines between items and no search results message. (Closed)
Patch Set: Fixes for Charlotte's comments. Created 3 years, 11 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 properties: { 8 properties: {
9 /** @type {BookmarkTreeNode} */ 9 /** @type {BookmarkTreeNode} */
10 item: { 10 item: {
11 type: Object, 11 type: Object,
12 observer: 'onItemChanged_', 12 observer: 'onItemChanged_',
13 }, 13 },
14 14
15 isFolder_: Boolean, 15 isFolder_: Boolean,
16
17 isLastItem: {
18 type: Boolean,
19 value: false,
20 reflectToAttribute: true,
21 },
16 }, 22 },
17 23
18 observers: [ 24 observers: [
19 'updateFavicon_(item.url)', 25 'updateFavicon_(item.url)',
20 ], 26 ],
21 27
22 /** 28 /**
23 * @param {Event} e 29 * @param {Event} e
24 * @private 30 * @private
25 */ 31 */
26 onMenuButtonOpenTap_: function(e) { 32 onMenuButtonOpenTap_: function(e) {
27 this.fire('open-item-menu', { 33 this.fire('open-item-menu', {
28 target: e.target, 34 target: e.target,
29 item: this.item 35 item: this.item,
30 }); 36 });
31 }, 37 },
32 38
33 /** @private */ 39 /** @private */
34 onItemChanged_: function() { 40 onItemChanged_: function() {
35 this.isFolder_ = !(this.item.url); 41 this.isFolder_ = !(this.item.url);
36 }, 42 },
37 43
38 /** @private */ 44 /** @private */
39 updateFavicon_: function(url) { 45 updateFavicon_: function(url) {
40 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url); 46 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url);
41 }, 47 },
42 }); 48 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698