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

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

Issue 2898303004: [MD Bookmarks] Add toasts. (Closed)
Patch Set: fix nits Created 3 years, 6 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
« no previous file with comments | « chrome/browser/resources/md_bookmarks/toast_manager.js ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 */ 60 */
61 onMenuButtonOpenTap_: function(e) { 61 onMenuButtonOpenTap_: function(e) {
62 var menu = /** @type {!CrActionMenuElement} */ (this.$.dropdown); 62 var menu = /** @type {!CrActionMenuElement} */ (this.$.dropdown);
63 menu.showAt(/** @type {!Element} */ (e.target)); 63 menu.showAt(/** @type {!Element} */ (e.target));
64 }, 64 },
65 65
66 /** @private */ 66 /** @private */
67 onSortTap_: function() { 67 onSortTap_: function() {
68 chrome.bookmarkManagerPrivate.sortChildren( 68 chrome.bookmarkManagerPrivate.sortChildren(
69 assert(this.getState().selectedFolder)); 69 assert(this.getState().selectedFolder));
70 bookmarks.ToastManager.getInstance().show(
71 loadTimeData.getString('toastFolderSorted'), true);
70 this.closeDropdownMenu_(); 72 this.closeDropdownMenu_();
71 }, 73 },
72 74
73 /** @private */ 75 /** @private */
74 onAddBookmarkTap_: function() { 76 onAddBookmarkTap_: function() {
75 var dialog = 77 var dialog =
76 /** @type {BookmarksEditDialogElement} */ (this.$.addDialog.get()); 78 /** @type {BookmarksEditDialogElement} */ (this.$.addDialog.get());
77 dialog.showAddDialog(false, assert(this.getState().selectedFolder)); 79 dialog.showAddDialog(false, assert(this.getState().selectedFolder));
78 this.closeDropdownMenu_(); 80 this.closeDropdownMenu_();
79 }, 81 },
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 }, 156 },
155 157
156 /** 158 /**
157 * @return {string} 159 * @return {string}
158 * @private 160 * @private
159 */ 161 */
160 getItemsSelectedString_: function() { 162 getItemsSelectedString_: function() {
161 return loadTimeData.getStringF('itemsSelected', this.selectedCount_); 163 return loadTimeData.getStringF('itemsSelected', this.selectedCount_);
162 }, 164 },
163 }); 165 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/toast_manager.js ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698