Chromium Code Reviews| 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 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1969 chrome.send('clearBrowsingData'); | 1969 chrome.send('clearBrowsingData'); |
| 1970 } | 1970 } |
| 1971 | 1971 |
| 1972 /** | 1972 /** |
| 1973 * Shows the dialog for the user to confirm removal of selected history entries. | 1973 * Shows the dialog for the user to confirm removal of selected history entries. |
| 1974 */ | 1974 */ |
| 1975 function showConfirmationOverlay() { | 1975 function showConfirmationOverlay() { |
| 1976 $('alertOverlay').classList.add('showing'); | 1976 $('alertOverlay').classList.add('showing'); |
| 1977 $('overlay').hidden = false; | 1977 $('overlay').hidden = false; |
| 1978 $('alertOverlayCancel').focus(); | 1978 $('alertOverlayCancel').focus(); |
| 1979 $('history-page').setAttribute('aria-hidden', 'true'); | |
|
Evan Stade
2014/09/23 20:46:30
is this related to the CL desc?
Dan Beam
2014/09/23 20:48:42
yeah, because it's required to pass the browser te
| |
| 1979 uber.invokeMethodOnParent('beginInterceptingEvents'); | 1980 uber.invokeMethodOnParent('beginInterceptingEvents'); |
| 1980 } | 1981 } |
| 1981 | 1982 |
| 1982 /** | 1983 /** |
| 1983 * Hides the confirmation overlay used to confirm selected history entries. | 1984 * Hides the confirmation overlay used to confirm selected history entries. |
| 1984 */ | 1985 */ |
| 1985 function hideConfirmationOverlay() { | 1986 function hideConfirmationOverlay() { |
| 1986 $('alertOverlay').classList.remove('showing'); | 1987 $('alertOverlay').classList.remove('showing'); |
| 1987 $('overlay').hidden = true; | 1988 $('overlay').hidden = true; |
| 1989 $('history-page').removeAttribute('aria-hidden'); | |
| 1988 uber.invokeMethodOnParent('stopInterceptingEvents'); | 1990 uber.invokeMethodOnParent('stopInterceptingEvents'); |
| 1989 } | 1991 } |
| 1990 | 1992 |
| 1991 /** | 1993 /** |
| 1992 * Shows the confirmation alert for history deletions and permits browser tests | 1994 * Shows the confirmation alert for history deletions and permits browser tests |
| 1993 * to override the dialog. | 1995 * to override the dialog. |
| 1994 * @param {function()=} okCallback A function to be called when the user presses | 1996 * @param {function()=} okCallback A function to be called when the user presses |
| 1995 * the ok button. | 1997 * the ok button. |
| 1996 * @param {function()=} cancelCallback A function to be called when the user | 1998 * @param {function()=} cancelCallback A function to be called when the user |
| 1997 * presses the cancel button. | 1999 * presses the cancel button. |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2267 historyView.reload(); | 2269 historyView.reload(); |
| 2268 } | 2270 } |
| 2269 | 2271 |
| 2270 // Add handlers to HTML elements. | 2272 // Add handlers to HTML elements. |
| 2271 document.addEventListener('DOMContentLoaded', load); | 2273 document.addEventListener('DOMContentLoaded', load); |
| 2272 | 2274 |
| 2273 // This event lets us enable and disable menu items before the menu is shown. | 2275 // This event lets us enable and disable menu items before the menu is shown. |
| 2274 document.addEventListener('canExecute', function(e) { | 2276 document.addEventListener('canExecute', function(e) { |
| 2275 e.canExecute = true; | 2277 e.canExecute = true; |
| 2276 }); | 2278 }); |
| OLD | NEW |