| 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
|
| index 5ee5454ff6110c8f05731a22a230561b7dc6f5f3..365487a55254e8aa6b0366b8384f00ed68f0fa64 100644
|
| --- a/chrome/browser/resources/md_bookmarks/list.js
|
| +++ b/chrome/browser/resources/md_bookmarks/list.js
|
| @@ -10,9 +10,6 @@ Polymer({
|
| ],
|
|
|
| properties: {
|
| - /** @type {BookmarkNode} */
|
| - menuItem_: Object,
|
| -
|
| /** @private {Array<string>} */
|
| displayedList_: {
|
| type: Array,
|
| @@ -29,7 +26,6 @@ Polymer({
|
|
|
| listeners: {
|
| 'click': 'deselectItems_',
|
| - 'open-item-menu': 'onOpenItemMenu_',
|
| },
|
|
|
| attached: function() {
|
| @@ -46,81 +42,6 @@ Polymer({
|
| return this.$.message;
|
| },
|
|
|
| - /**
|
| - * @param {Event} e
|
| - * @private
|
| - */
|
| - onOpenItemMenu_: function(e) {
|
| - this.menuItem_ = e.detail.item;
|
| - var menu = /** @type {!CrActionMenuElement} */ (
|
| - this.$.dropdown);
|
| - if (e.detail.targetElement) {
|
| - menu.showAt(/** @type {!Element} */ (e.detail.targetElement));
|
| - } else {
|
| - menu.showAtPosition({
|
| - top: e.detail.y,
|
| - left: e.detail.x,
|
| - });
|
| - }
|
| - },
|
| -
|
| - /** @private */
|
| - onEditTap_: function() {
|
| - this.closeDropdownMenu_();
|
| - /** @type {BookmarksEditDialogElement} */ (this.$.editDialog.get())
|
| - .showEditDialog(this.menuItem_);
|
| - },
|
| -
|
| - /** @private */
|
| - onCopyURLTap_: function() {
|
| - var idList = [this.menuItem_.id];
|
| - chrome.bookmarkManagerPrivate.copy(idList, function() {
|
| - // TODO(jiaxi): Add toast later.
|
| - });
|
| - this.closeDropdownMenu_();
|
| - },
|
| -
|
| - /** @private */
|
| - onDeleteTap_: function() {
|
| - if (this.menuItem_.url) {
|
| - chrome.bookmarks.remove(this.menuItem_.id, function() {
|
| - // TODO(jiaxi): Add toast later.
|
| - }.bind(this));
|
| - } else {
|
| - chrome.bookmarks.removeTree(this.menuItem_.id, function() {
|
| - // TODO(jiaxi): Add toast later.
|
| - }.bind(this));
|
| - }
|
| - this.closeDropdownMenu_();
|
| - },
|
| -
|
| - /**
|
| - * Close the menu on mousedown so clicks can propagate to the underlying UI.
|
| - * This allows the user to right click the list while a context menu is
|
| - * showing and get another context menu.
|
| - * @param {Event} e
|
| - * @private
|
| - */
|
| - onMenuMousedown_: function(e) {
|
| - if (e.path[0] != this.$.dropdown)
|
| - return;
|
| -
|
| - this.$.dropdown.close();
|
| - },
|
| -
|
| - /** @private */
|
| - closeDropdownMenu_: function() {
|
| - var menu = /** @type {!CrActionMenuElement} */ (
|
| - this.$.dropdown);
|
| - menu.close();
|
| - },
|
| -
|
| - /** @private */
|
| - getEditActionLabel_: function() {
|
| - var label = this.menuItem_.url ? 'menuEdit' : 'menuRename';
|
| - return loadTimeData.getString(label);
|
| - },
|
| -
|
| /** @private */
|
| emptyListMessage_: function() {
|
| var emptyListMessage = this.searchTerm_ ? 'noSearchResults' : 'emptyList';
|
|
|