Chromium Code Reviews| 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 if (this.getSelectedList_()) |
|
tsergeant
2016/08/19 00:21:38
you'll need to do a good old-fashioned rebase for
calamity
2016/08/19 03:50:57
Done.
| |
| 97 this.getSelectedList_().unselectAllItems(count); | |
| 97 }, | 98 }, |
| 98 | 99 |
| 99 /** | 100 /** |
| 100 * Delete all the currently selected history items. Will prompt the user with | 101 * Delete all the currently selected history items. Will prompt the user with |
| 101 * a dialog to confirm that the deletion should be performed. | 102 * a dialog to confirm that the deletion should be performed. |
| 102 */ | 103 */ |
| 103 deleteSelectedWithPrompt: function() { | 104 deleteSelectedWithPrompt: function() { |
| 104 if (!loadTimeData.getBoolean('allowDeletingHistory')) | 105 if (!loadTimeData.getBoolean('allowDeletingHistory')) |
| 105 return; | 106 return; |
| 106 this.$.dialog.get().then(function(dialog) { | 107 this.$.dialog.get().then(function(dialog) { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 }, | 208 }, |
| 208 | 209 |
| 209 /** | 210 /** |
| 210 * @return {HTMLElement} | 211 * @return {HTMLElement} |
| 211 * @private | 212 * @private |
| 212 */ | 213 */ |
| 213 getSelectedList_: function() { | 214 getSelectedList_: function() { |
| 214 return this.$.content.selectedItem; | 215 return this.$.content.selectedItem; |
| 215 }, | 216 }, |
| 216 }); | 217 }); |
| OLD | NEW |