| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 getDropTarget: function() { | 60 getDropTarget: function() { |
| 61 return this; | 61 return this; |
| 62 }, | 62 }, |
| 63 | 63 |
| 64 /** | 64 /** |
| 65 * @param {Event} e | 65 * @param {Event} e |
| 66 * @private | 66 * @private |
| 67 */ | 67 */ |
| 68 onContextMenu_: function(e) { | 68 onContextMenu_: function(e) { |
| 69 e.preventDefault(); | 69 e.preventDefault(); |
| 70 this.focus(); |
| 70 if (!this.isSelectedItem_) | 71 if (!this.isSelectedItem_) |
| 71 this.selectThisItem_(); | 72 this.selectThisItem_(); |
| 72 | 73 |
| 73 this.fire('open-item-menu', { | 74 this.fire('open-item-menu', { |
| 74 x: e.clientX, | 75 x: e.clientX, |
| 75 y: e.clientY, | 76 y: e.clientY, |
| 76 }); | 77 }); |
| 77 }, | 78 }, |
| 78 | 79 |
| 79 /** | 80 /** |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 }, | 150 }, |
| 150 | 151 |
| 151 /** | 152 /** |
| 152 * @param {string} url | 153 * @param {string} url |
| 153 * @private | 154 * @private |
| 154 */ | 155 */ |
| 155 updateFavicon_: function(url) { | 156 updateFavicon_: function(url) { |
| 156 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url); | 157 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url); |
| 157 }, | 158 }, |
| 158 }); | 159 }); |
| OLD | NEW |