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 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 // Only show the controls if the command line switch is activated. | 1564 // Only show the controls if the command line switch is activated. |
1565 if (loadTimeData.getBoolean('groupByDomain') || | 1565 if (loadTimeData.getBoolean('groupByDomain') || |
1566 loadTimeData.getBoolean('isManagedProfile')) { | 1566 loadTimeData.getBoolean('isManagedProfile')) { |
1567 // Hide the top container which has the "Clear browsing data" and "Remove | 1567 // Hide the top container which has the "Clear browsing data" and "Remove |
1568 // selected entries" buttons since they're unavailable in managed mode | 1568 // selected entries" buttons since they're unavailable in managed mode |
1569 $('top-container').hidden = true; | 1569 $('top-container').hidden = true; |
1570 $('history-page').classList.add('big-topbar-page'); | 1570 $('history-page').classList.add('big-topbar-page'); |
1571 $('filter-controls').hidden = false; | 1571 $('filter-controls').hidden = false; |
1572 } | 1572 } |
1573 | 1573 |
1574 var title = loadTimeData.getString('title'); | 1574 uber.setTitle(loadTimeData.getString('title')); |
1575 uber.invokeMethodOnParent('setTitle', {title: title}); | |
1576 | 1575 |
1577 // Adjust the position of the notification bar when the window size changes. | 1576 // Adjust the position of the notification bar when the window size changes. |
1578 window.addEventListener('resize', | 1577 window.addEventListener('resize', |
1579 historyView.positionNotificationBar.bind(historyView)); | 1578 historyView.positionNotificationBar.bind(historyView)); |
1580 | 1579 |
1581 cr.ui.FocusManager.disableMouseFocusOnButtons(); | 1580 cr.ui.FocusManager.disableMouseFocusOnButtons(); |
1582 | 1581 |
1583 if (isMobileVersion()) { | 1582 if (isMobileVersion()) { |
1584 // Move the search box out of the header. | 1583 // Move the search box out of the header. |
1585 var resultsDisplay = $('results-display'); | 1584 var resultsDisplay = $('results-display'); |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2021 historyView.reload(); | 2020 historyView.reload(); |
2022 } | 2021 } |
2023 | 2022 |
2024 // Add handlers to HTML elements. | 2023 // Add handlers to HTML elements. |
2025 document.addEventListener('DOMContentLoaded', load); | 2024 document.addEventListener('DOMContentLoaded', load); |
2026 | 2025 |
2027 // This event lets us enable and disable menu items before the menu is shown. | 2026 // This event lets us enable and disable menu items before the menu is shown. |
2028 document.addEventListener('canExecute', function(e) { | 2027 document.addEventListener('canExecute', function(e) { |
2029 e.canExecute = true; | 2028 e.canExecute = true; |
2030 }); | 2029 }); |
OLD | NEW |