| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 Polymer({ | 5 Polymer({ |
| 6 is: 'bookmarks-toolbar', | 6 is: 'bookmarks-toolbar', |
| 7 | 7 |
| 8 behaviors: [ | 8 behaviors: [ |
| 9 bookmarks.StoreClient, | 9 bookmarks.StoreClient, |
| 10 ], | 10 ], |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 * @param {Event} e | 38 * @param {Event} e |
| 39 * @private | 39 * @private |
| 40 */ | 40 */ |
| 41 onMenuButtonOpenTap_: function(e) { | 41 onMenuButtonOpenTap_: function(e) { |
| 42 var menu = /** @type {!CrActionMenuElement} */ (this.$.dropdown); | 42 var menu = /** @type {!CrActionMenuElement} */ (this.$.dropdown); |
| 43 menu.showAt(/** @type {!Element} */ (e.target)); | 43 menu.showAt(/** @type {!Element} */ (e.target)); |
| 44 }, | 44 }, |
| 45 | 45 |
| 46 /** @private */ | 46 /** @private */ |
| 47 onSortTap_: function() { | 47 onSortTap_: function() { |
| 48 chrome.bookmarkManagerPrivate.sortChildren( |
| 49 assert(this.getState().selectedFolder)); |
| 48 this.closeDropdownMenu_(); | 50 this.closeDropdownMenu_(); |
| 49 }, | 51 }, |
| 50 | 52 |
| 51 /** @private */ | 53 /** @private */ |
| 52 onAddBookmarkTap_: function() { | 54 onAddBookmarkTap_: function() { |
| 53 var dialog = | 55 var dialog = |
| 54 /** @type {BookmarksEditDialogElement} */ (this.$.addDialog.get()); | 56 /** @type {BookmarksEditDialogElement} */ (this.$.addDialog.get()); |
| 55 dialog.showAddDialog(false, assert(this.getState().selectedFolder)); | 57 dialog.showAddDialog(false, assert(this.getState().selectedFolder)); |
| 56 this.closeDropdownMenu_(); | 58 this.closeDropdownMenu_(); |
| 57 }, | 59 }, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 }, | 103 }, |
| 102 | 104 |
| 103 /** | 105 /** |
| 104 * @return {boolean} | 106 * @return {boolean} |
| 105 * @private | 107 * @private |
| 106 */ | 108 */ |
| 107 hasSearchTerm_: function() { | 109 hasSearchTerm_: function() { |
| 108 return !!this.searchTerm_; | 110 return !!this.searchTerm_; |
| 109 }, | 111 }, |
| 110 }); | 112 }); |
| OLD | NEW |