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 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 message += '<span>' + loadTimeData.getString( | 1175 message += '<span>' + loadTimeData.getString( |
1176 hasSyncedResults ? 'hasSyncedResults' : 'noSyncedResults') + '</span>'; | 1176 hasSyncedResults ? 'hasSyncedResults' : 'noSyncedResults') + '</span>'; |
1177 } | 1177 } |
1178 | 1178 |
1179 if (includeOtherFormsOfBrowsingHistory) { | 1179 if (includeOtherFormsOfBrowsingHistory) { |
1180 message += ' ' /* A whitespace to separate <span>s. */ + '<span>' + | 1180 message += ' ' /* A whitespace to separate <span>s. */ + '<span>' + |
1181 loadTimeData.getString('otherFormsOfBrowsingHistory') + '</span>'; | 1181 loadTimeData.getString('otherFormsOfBrowsingHistory') + '</span>'; |
1182 } | 1182 } |
1183 | 1183 |
1184 if (message) | 1184 if (message) |
1185 this.showNotification(message); | 1185 this.showNotification(message, false /* isWarning */); |
1186 }; | 1186 }; |
1187 | 1187 |
1188 /** | 1188 /** |
1189 * @param {Visit} visit The visit about to be removed from this view. | 1189 * @param {Visit} visit The visit about to be removed from this view. |
1190 */ | 1190 */ |
1191 HistoryView.prototype.onBeforeRemove = function(visit) { | 1191 HistoryView.prototype.onBeforeRemove = function(visit) { |
1192 assert(this.currentVisits_.indexOf(visit) >= 0); | 1192 assert(this.currentVisits_.indexOf(visit) >= 0); |
1193 | 1193 |
1194 var rowIndex = this.focusGrid_.getRowIndexForTarget(document.activeElement); | 1194 var rowIndex = this.focusGrid_.getRowIndexForTarget(document.activeElement); |
1195 if (rowIndex == -1) | 1195 if (rowIndex == -1) |
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2402 historyView.reload(); | 2402 historyView.reload(); |
2403 } | 2403 } |
2404 | 2404 |
2405 // Add handlers to HTML elements. | 2405 // Add handlers to HTML elements. |
2406 document.addEventListener('DOMContentLoaded', load); | 2406 document.addEventListener('DOMContentLoaded', load); |
2407 | 2407 |
2408 // This event lets us enable and disable menu items before the menu is shown. | 2408 // This event lets us enable and disable menu items before the menu is shown. |
2409 document.addEventListener('canExecute', function(e) { | 2409 document.addEventListener('canExecute', function(e) { |
2410 e.canExecute = true; | 2410 e.canExecute = true; |
2411 }); | 2411 }); |
OLD | NEW |