| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // TODO(arv): Now that this is driven by a data model, implement a data model | 5 // TODO(arv): Now that this is driven by a data model, implement a data model |
| 6 // that handles the loading and the events from the bookmark backend. | 6 // that handles the loading and the events from the bookmark backend. |
| 7 | 7 |
| 8 cr.define('bmm', function() { | 8 cr.define('bmm', function() { |
| 9 var List = cr.ui.List; | 9 var List = cr.ui.List; |
| 10 var ListItem = cr.ui.ListItem; | 10 var ListItem = cr.ui.ListItem; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 * @private | 158 * @private |
| 159 * @param {!Event} e The mouseover event object. | 159 * @param {!Event} e The mouseover event object. |
| 160 */ | 160 */ |
| 161 handleMouseOver_: function(e) { | 161 handleMouseOver_: function(e) { |
| 162 var el = e.target; | 162 var el = e.target; |
| 163 while (el && el.parentNode != this) { | 163 while (el && el.parentNode != this) { |
| 164 el = el.parentNode; | 164 el = el.parentNode; |
| 165 } | 165 } |
| 166 | 166 |
| 167 if (el && el.parentNode == this && | 167 if (el && el.parentNode == this && |
| 168 !el.editing && |
| 168 !(el.lastChild instanceof ContextMenuButton)) { | 169 !(el.lastChild instanceof ContextMenuButton)) { |
| 169 el.appendChild(new ContextMenuButton); | 170 el.appendChild(new ContextMenuButton); |
| 170 } | 171 } |
| 171 }, | 172 }, |
| 172 | 173 |
| 173 /** | 174 /** |
| 174 * Dispatches an urlClicked event which is used to open URLs in new | 175 * Dispatches an urlClicked event which is used to open URLs in new |
| 175 * tabs etc. | 176 * tabs etc. |
| 176 * @private | 177 * @private |
| 177 * @param {string} url The URL that was clicked. | 178 * @param {string} url The URL that was clicked. |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 } | 567 } |
| 567 } | 568 } |
| 568 } | 569 } |
| 569 }; | 570 }; |
| 570 | 571 |
| 571 return { | 572 return { |
| 572 BookmarkList: BookmarkList, | 573 BookmarkList: BookmarkList, |
| 573 list: list | 574 list: list |
| 574 }; | 575 }; |
| 575 }); | 576 }); |
| OLD | NEW |