Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: chrome/browser/resources/md_bookmarks/list.js

Issue 2603303002: [MD Bookmarks] Add UI for Material Bookmarks. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 Polymer({
6 is: 'bookmarks-list',
7 properties: {
8 /** @type {BookmarkTreeNode} */
9 selectedNode: {
10 type: Object
11 },
calamity 2017/01/04 00:43:00 selectedNode: Object,
jiaxi 2017/01/04 02:50:16 Done.
12 },
13
14 listeners: {
15 'toggle-menu': 'toggleMenu_'
tsergeant 2017/01/03 23:31:17 Prefer to name event listeners as `onEventName`, s
jiaxi 2017/01/04 02:50:16 Done.
16 },
17
18 /**
19 * @param {Event} e
20 * @private
21 */
22 toggleMenu_: function(e) {
23 var menu = /** @type {!CrActionMenuElement} */ (
24 this.$.dropdown);
25 menu.showAt(/** @type {!Element} */ (e.detail.target));
26 },
27
28 // TODO(jiaxi): change these dummy click event holders later.
calamity 2017/01/04 00:43:00 handlers?
jiaxi 2017/01/04 02:50:16 Done.
29 /** @private */
30 onEditTap_: function() {
31 this.closeDropdownMenu_();
32 },
33
34 /** @private */
35 onCopyURLTap_: function() {
36 this.closeDropdownMenu_();
37 },
38
39 /** @private */
40 onDeleteTap_: function() {
41 this.closeDropdownMenu_();
42 },
43
44 /** @private */
45 closeDropdownMenu_: function() {
46 var menu = /** @type {!CrActionMenuElement} */ (
47 this.$.dropdown);
48 menu.close();
49 }
50 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698