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

Unified Diff: chrome/browser/resources/md_bookmarks/list.js

Issue 2603303002: [MD Bookmarks] Add UI for Material Bookmarks. (Closed)
Patch Set: change TODO position 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/md_bookmarks/list.html ('k') | chrome/browser/resources/md_bookmarks/sidebar.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..426cbb33be433e5dafe803e9ac440ab97314edc7
--- /dev/null
+++ b/chrome/browser/resources/md_bookmarks/list.js
@@ -0,0 +1,49 @@
+// 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',
+
+ 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();
+ }
+});
« no previous file with comments | « chrome/browser/resources/md_bookmarks/list.html ('k') | chrome/browser/resources/md_bookmarks/sidebar.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698