| OLD | NEW |
| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 /** @private */ | 80 /** @private */ |
| 81 onItemChanged_: function() { | 81 onItemChanged_: function() { |
| 82 this.isFolder_ = !(this.item_.url); | 82 this.isFolder_ = !(this.item_.url); |
| 83 }, | 83 }, |
| 84 | 84 |
| 85 /** | 85 /** |
| 86 * @param {Event} e | 86 * @param {Event} e |
| 87 * @private | 87 * @private |
| 88 */ | 88 */ |
| 89 onClick_: function(e) { | 89 onClick_: function(e) { |
| 90 this.dispatch(bookmarks.actions.selectItem( | 90 this.dispatch( |
| 91 this.itemId, e.ctrlKey, e.shiftKey, this.getState())); | 91 bookmarks.actions.selectItem(this.itemId, e.ctrlKey, e.shiftKey)); |
| 92 e.stopPropagation(); | 92 e.stopPropagation(); |
| 93 }, | 93 }, |
| 94 | 94 |
| 95 /** | 95 /** |
| 96 * @param {Event} e | 96 * @param {Event} e |
| 97 * @private | 97 * @private |
| 98 */ | 98 */ |
| 99 onDblClick_: function(e) { | 99 onDblClick_: function(e) { |
| 100 if (!this.item_.url) | 100 if (!this.item_.url) |
| 101 this.dispatch(bookmarks.actions.selectFolder(this.item_.id)); | 101 this.dispatch(bookmarks.actions.selectFolder(this.item_.id)); |
| 102 else | 102 else |
| 103 chrome.tabs.create({url: this.item_.url}); | 103 chrome.tabs.create({url: this.item_.url}); |
| 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 }); |
| OLD | NEW |