| 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: '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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 lastVisitTime, maxResults | 86 lastVisitTime, maxResults |
| 87 ]); | 87 ]); |
| 88 }, | 88 }, |
| 89 | 89 |
| 90 /** @return {number} */ | 90 /** @return {number} */ |
| 91 getSelectedItemCount: function() { | 91 getSelectedItemCount: function() { |
| 92 return this.getSelectedList_().selectedPaths.size; | 92 return this.getSelectedList_().selectedPaths.size; |
| 93 }, | 93 }, |
| 94 | 94 |
| 95 unselectAllItems: function(count) { | 95 unselectAllItems: function(count) { |
| 96 this.getSelectedList_().unselectAllItems(count); | 96 var selectedList = this.getSelectedList_(); |
| 97 if (selectedList) |
| 98 selectedList.unselectAllItems(count); |
| 97 }, | 99 }, |
| 98 | 100 |
| 99 /** | 101 /** |
| 100 * Delete all the currently selected history items. Will prompt the user with | 102 * Delete all the currently selected history items. Will prompt the user with |
| 101 * a dialog to confirm that the deletion should be performed. | 103 * a dialog to confirm that the deletion should be performed. |
| 102 */ | 104 */ |
| 103 deleteSelectedWithPrompt: function() { | 105 deleteSelectedWithPrompt: function() { |
| 104 if (!loadTimeData.getBoolean('allowDeletingHistory')) | 106 if (!loadTimeData.getBoolean('allowDeletingHistory')) |
| 105 return; | 107 return; |
| 106 this.$.dialog.get().then(function(dialog) { | 108 this.$.dialog.get().then(function(dialog) { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 }, | 209 }, |
| 208 | 210 |
| 209 /** | 211 /** |
| 210 * @return {HTMLElement} | 212 * @return {HTMLElement} |
| 211 * @private | 213 * @private |
| 212 */ | 214 */ |
| 213 getSelectedList_: function() { | 215 getSelectedList_: function() { |
| 214 return this.$.content.selectedItem; | 216 return this.$.content.selectedItem; |
| 215 }, | 217 }, |
| 216 }); | 218 }); |
| OLD | NEW |