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

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

Issue 2603303002: [MD Bookmarks] Add UI for Material Bookmarks. (Closed)
Patch Set: 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
(Empty)
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
3 // found in the LICENSE file.
4
5 Polymer({
6 is: 'bookmarks-item',
7
8 properties: {
9 /** @type {BookmarkTreeNode} */
10 item: {
11 type: Object,
12 observer: 'onItemChanged_'
13 },
14
15 isFolder_: {
tsergeant 2017/01/03 23:31:17 Use the short form here: isFolder_: Boolean
jiaxi 2017/01/04 02:50:16 Done.
16 type: Boolean,
17 }
18 },
19
20 observers: [
21 'updateFavicon_(item.url)'
22 ],
23
24 /**
25 * @param {Event} e
26 * @private
27 */
28 onMenuButtonOpenTap_: function(e) {
29 this.fire('toggle-menu', {
30 target: e.target
31 });
32 },
33
34 /** @private */
35 onItemChanged_: function() {
36 this.isFolder_ = !(this.item.url);
37 },
38
39 updateFavicon_: function(url) {
tsergeant 2017/01/03 23:31:17 @private
jiaxi 2017/01/04 02:50:16 Done.
40 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url);
41 }
42 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698