Chromium Code Reviews| 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_(); | |
|
calamity
2017/07/06 08:08:58
nit: newline
tsergeant
2017/07/06 08:23:22
Done.
| |
| 151 var commandManager = bookmarks.CommandManager.getInstance(); | 153 var commandManager = bookmarks.CommandManager.getInstance(); |
| 152 var itemSet = this.getState().selection.items; | 154 var itemSet = this.getState().selection.items; |
| 153 if (commandManager.canExecute(Command.OPEN, itemSet)) | 155 if (commandManager.canExecute(Command.OPEN, itemSet)) |
| 154 commandManager.handle(Command.OPEN, itemSet); | 156 commandManager.handle(Command.OPEN, itemSet); |
| 155 }, | 157 }, |
| 156 | 158 |
| 157 /** | 159 /** |
| 158 * @param {string} url | 160 * @param {string} url |
| 159 * @private | 161 * @private |
| 160 */ | 162 */ |
| 161 updateFavicon_: function(url) { | 163 updateFavicon_: function(url) { |
| 162 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url); | 164 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url); |
| 163 }, | 165 }, |
| 164 }); | 166 }); |
| OLD | NEW |