OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Send the history query immediately. This allows the query to process during | 5 // Send the history query immediately. This allows the query to process during |
6 // the initial page startup. | 6 // the initial page startup. |
7 chrome.send('queryHistory', ['', 0, 0, 0, RESULTS_PER_PAGE]); | 7 chrome.send('queryHistory', ['', 0, 0, 0, RESULTS_PER_PAGE]); |
8 chrome.send('getForeignSessions'); | 8 chrome.send('getForeignSessions'); |
9 | 9 |
10 /** | 10 /** |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 if (info.finished) | 90 if (info.finished) |
91 list.disableResultLoading(); | 91 list.disableResultLoading(); |
92 // TODO(tsergeant): Showing everything as soon as the list is ready is not | 92 // TODO(tsergeant): Showing everything as soon as the list is ready is not |
93 // ideal, as the sidebar can still pop in after. Fix this to show everything | 93 // ideal, as the sidebar can still pop in after. Fix this to show everything |
94 // at once. | 94 // at once. |
95 document.body.classList.remove('loading'); | 95 document.body.classList.remove('loading'); |
96 }); | 96 }); |
97 } | 97 } |
98 | 98 |
99 /** | 99 /** |
| 100 * Called by the history backend after receiving results and after discovering |
| 101 * the existence of other forms of browsing history. |
| 102 * @param {boolean} hasSyncedResults Whether there are synced results. |
| 103 * @param {boolean} includeOtherFormsOfBrowsingHistory Whether to include |
| 104 * a sentence about the existence of other forms of browsing history. |
| 105 */ |
| 106 function showNotification( |
| 107 hasSyncedResults, includeOtherFormsOfBrowsingHistory) { |
| 108 // TODO(msramek): Implement the joint notification about web history and other |
| 109 // forms of browsing history for the MD history page. |
| 110 } |
| 111 |
| 112 /** |
100 * Receives the synced history data. An empty list means that either there are | 113 * Receives the synced history data. An empty list means that either there are |
101 * no foreign sessions, or tab sync is disabled for this profile. | 114 * no foreign sessions, or tab sync is disabled for this profile. |
102 * |isTabSyncEnabled| makes it possible to distinguish between the cases. | 115 * |isTabSyncEnabled| makes it possible to distinguish between the cases. |
103 * | 116 * |
104 * @param {!Array<!ForeignSession>} sessionList Array of objects describing the | 117 * @param {!Array<!ForeignSession>} sessionList Array of objects describing the |
105 * sessions from other devices. | 118 * sessions from other devices. |
106 * @param {boolean} isTabSyncEnabled Is tab sync enabled for this profile? | 119 * @param {boolean} isTabSyncEnabled Is tab sync enabled for this profile? |
107 */ | 120 */ |
108 function setForeignSessions(sessionList, isTabSyncEnabled) { | 121 function setForeignSessions(sessionList, isTabSyncEnabled) { |
109 // TODO(calamity): Add a 'no synced devices' message when sessions are empty. | 122 // TODO(calamity): Add a 'no synced devices' message when sessions are empty. |
(...skipping 21 matching lines...) Expand all Loading... |
131 * Called by the history backend when the deletion failed. | 144 * Called by the history backend when the deletion failed. |
132 */ | 145 */ |
133 function deleteFailed() { | 146 function deleteFailed() { |
134 } | 147 } |
135 | 148 |
136 /** | 149 /** |
137 * Called when the history is deleted by someone else. | 150 * Called when the history is deleted by someone else. |
138 */ | 151 */ |
139 function historyDeleted() { | 152 function historyDeleted() { |
140 } | 153 } |
OLD | NEW |