| 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.MouseFocusBehavior, | 9 bookmarks.MouseFocusBehavior, |
| 10 bookmarks.StoreClient, | 10 bookmarks.StoreClient, |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 141 } |
| 142 e.stopPropagation(); | 142 e.stopPropagation(); |
| 143 e.preventDefault(); | 143 e.preventDefault(); |
| 144 }, | 144 }, |
| 145 | 145 |
| 146 /** | 146 /** |
| 147 * @param {MouseEvent} e | 147 * @param {MouseEvent} e |
| 148 * @private | 148 * @private |
| 149 */ | 149 */ |
| 150 onDblClick_: function(e) { | 150 onDblClick_: function(e) { |
| 151 if (!this.isSelectedItem_) |
| 152 this.selectThisItem_(); |
| 153 |
| 151 var commandManager = bookmarks.CommandManager.getInstance(); | 154 var commandManager = bookmarks.CommandManager.getInstance(); |
| 152 var itemSet = this.getState().selection.items; | 155 var itemSet = this.getState().selection.items; |
| 153 if (commandManager.canExecute(Command.OPEN, itemSet)) | 156 if (commandManager.canExecute(Command.OPEN, itemSet)) |
| 154 commandManager.handle(Command.OPEN, itemSet); | 157 commandManager.handle(Command.OPEN, itemSet); |
| 155 }, | 158 }, |
| 156 | 159 |
| 157 /** | 160 /** |
| 158 * @param {string} url | 161 * @param {string} url |
| 159 * @private | 162 * @private |
| 160 */ | 163 */ |
| 161 updateFavicon_: function(url) { | 164 updateFavicon_: function(url) { |
| 162 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url); | 165 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url); |
| 163 }, | 166 }, |
| 164 }); | 167 }); |
| OLD | NEW |