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

Side by Side Diff: chrome/browser/resources/md_history/list_container.js

Issue 2180823004: Migrate <cr-dialog> from PaperDialogBehavior to native <dialog>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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: 'history-list-container', 6 is: 'history-list-container',
7 7
8 properties: { 8 properties: {
9 // The path of the currently selected page. 9 // The path of the currently selected page.
10 selectedPage_: String, 10 selectedPage_: String,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 }, 90 },
91 91
92 /** 92 /**
93 * Delete all the currently selected history items. Will prompt the user with 93 * Delete all the currently selected history items. Will prompt the user with
94 * a dialog to confirm that the deletion should be performed. 94 * a dialog to confirm that the deletion should be performed.
95 */ 95 */
96 deleteSelectedWithPrompt: function() { 96 deleteSelectedWithPrompt: function() {
97 if (!loadTimeData.getBoolean('allowDeletingHistory')) 97 if (!loadTimeData.getBoolean('allowDeletingHistory'))
98 return; 98 return;
99 99
100 this.$.dialog.open(); 100 this.$.dialog.showModal();
101 }, 101 },
102 102
103 /** 103 /**
104 * @param {HistoryRange} range 104 * @param {HistoryRange} range
105 * @private 105 * @private
106 */ 106 */
107 groupedRangeChanged_: function(range) { 107 groupedRangeChanged_: function(range) {
108 this.selectedPage_ = this.queryState.range == HistoryRange.ALL_TIME ? 108 this.selectedPage_ = this.queryState.range == HistoryRange.ALL_TIME ?
109 'infinite-list' : 'grouped-list'; 109 'infinite-list' : 'grouped-list';
110 110
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 .then(function(items) { 184 .then(function(items) {
185 this.$['infinite-list'].removeDeletedHistory_(items); 185 this.$['infinite-list'].removeDeletedHistory_(items);
186 // This unselect-all is to reset the toolbar when deleting a selected 186 // This unselect-all is to reset the toolbar when deleting a selected
187 // item. TODO(tsergeant): Make this automatic based on observing list 187 // item. TODO(tsergeant): Make this automatic based on observing list
188 // modifications. 188 // modifications.
189 this.fire('unselect-all'); 189 this.fire('unselect-all');
190 }.bind(this)); 190 }.bind(this));
191 menu.closeMenu(); 191 menu.closeMenu();
192 }, 192 },
193 }); 193 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698