OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <include src="../uber/uber_utils.js"> | 5 <include src="../uber/uber_utils.js"> |
6 <include src="history_focus_manager.js"> | 6 <include src="history_focus_manager.js"> |
7 | 7 |
8 /////////////////////////////////////////////////////////////////////////////// | 8 /////////////////////////////////////////////////////////////////////////////// |
9 // Globals: | 9 // Globals: |
10 /** @const */ var RESULTS_PER_PAGE = 150; | 10 /** @const */ var RESULTS_PER_PAGE = 150; |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 }; | 989 }; |
990 | 990 |
991 // HistoryView, private: ------------------------------------------------------ | 991 // HistoryView, private: ------------------------------------------------------ |
992 | 992 |
993 /** | 993 /** |
994 * Clear the results in the view. Since we add results piecemeal, we need | 994 * Clear the results in the view. Since we add results piecemeal, we need |
995 * to clear them out when we switch to a new page or reload. | 995 * to clear them out when we switch to a new page or reload. |
996 * @private | 996 * @private |
997 */ | 997 */ |
998 HistoryView.prototype.clear_ = function() { | 998 HistoryView.prototype.clear_ = function() { |
| 999 if ($('alertOverlay').classList.contains('showing')) |
| 1000 hideConfirmationOverlay(); |
| 1001 |
999 this.resultDiv_.textContent = ''; | 1002 this.resultDiv_.textContent = ''; |
1000 | 1003 |
1001 this.currentVisits_.forEach(function(visit) { | 1004 this.currentVisits_.forEach(function(visit) { |
1002 visit.isRendered = false; | 1005 visit.isRendered = false; |
1003 }); | 1006 }); |
1004 this.currentVisits_ = []; | 1007 this.currentVisits_ = []; |
1005 | 1008 |
1006 document.body.classList.remove('has-results'); | 1009 document.body.classList.remove('has-results'); |
1007 }; | 1010 }; |
1008 | 1011 |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2020 historyView.reload(); | 2023 historyView.reload(); |
2021 } | 2024 } |
2022 | 2025 |
2023 // Add handlers to HTML elements. | 2026 // Add handlers to HTML elements. |
2024 document.addEventListener('DOMContentLoaded', load); | 2027 document.addEventListener('DOMContentLoaded', load); |
2025 | 2028 |
2026 // This event lets us enable and disable menu items before the menu is shown. | 2029 // This event lets us enable and disable menu items before the menu is shown. |
2027 document.addEventListener('canExecute', function(e) { | 2030 document.addEventListener('canExecute', function(e) { |
2028 e.canExecute = true; | 2031 e.canExecute = true; |
2029 }); | 2032 }); |
OLD | NEW |