Chromium Code Reviews| Index: chrome/browser/resources/md_bookmarks/list.js |
| diff --git a/chrome/browser/resources/md_bookmarks/list.js b/chrome/browser/resources/md_bookmarks/list.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4b4bd5765cf4026846b1d9540769ac6d6d35e1cf |
| --- /dev/null |
| +++ b/chrome/browser/resources/md_bookmarks/list.js |
| @@ -0,0 +1,48 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +Polymer({ |
| + is: 'bookmarks-list', |
|
tsergeant
2017/01/04 03:44:12
Blank line after this.
jiaxi
2017/01/04 04:12:33
Done.
|
| + properties: { |
| + /** @type {BookmarkTreeNode} */ |
| + selectedNode: Object, |
| + }, |
| + |
| + listeners: { |
| + 'toggle-menu': 'onToggleMenu_' |
| + }, |
| + |
| + /** |
| + * @param {Event} e |
| + * @private |
| + */ |
| + onToggleMenu_: function(e) { |
| + var menu = /** @type {!CrActionMenuElement} */ ( |
| + this.$.dropdown); |
| + menu.showAt(/** @type {!Element} */ (e.detail.target)); |
| + }, |
| + |
| + // TODO(jiaxi): change these dummy click event handlers later. |
| + /** @private */ |
| + onEditTap_: function() { |
| + this.closeDropdownMenu_(); |
| + }, |
| + |
| + /** @private */ |
| + onCopyURLTap_: function() { |
| + this.closeDropdownMenu_(); |
| + }, |
| + |
| + /** @private */ |
| + onDeleteTap_: function() { |
| + this.closeDropdownMenu_(); |
| + }, |
| + |
| + /** @private */ |
| + closeDropdownMenu_: function() { |
| + var menu = /** @type {!CrActionMenuElement} */ ( |
| + this.$.dropdown); |
| + menu.close(); |
| + } |
| +}); |