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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 if (info.finished) | 93 if (info.finished) |
94 list.disableResultLoading(); | 94 list.disableResultLoading(); |
95 // TODO(tsergeant): Showing everything as soon as the list is ready is not | 95 // TODO(tsergeant): Showing everything as soon as the list is ready is not |
96 // ideal, as the sidebar can still pop in after. Fix this to show everything | 96 // ideal, as the sidebar can still pop in after. Fix this to show everything |
97 // at once. | 97 // at once. |
98 document.body.classList.remove('loading'); | 98 document.body.classList.remove('loading'); |
99 }); | 99 }); |
100 } | 100 } |
101 | 101 |
102 /** | 102 /** |
| 103 * Called by the history backend after receiving results and after discovering |
| 104 * the existence of other forms of browsing history. |
| 105 * @param {boolean} hasSyncedResults Whether there are synced results. |
| 106 * @param {boolean} includeOtherFormsOfBrowsingHistory Whether to include |
| 107 * a sentence about the existence of other forms of browsing history. |
| 108 */ |
| 109 function showNotification( |
| 110 hasSyncedResults, includeOtherFormsOfBrowsingHistory) { |
| 111 // TODO(msramek): Implement the joint notification about web history and other |
| 112 // forms of browsing history for the MD history page. |
| 113 } |
| 114 |
| 115 /** |
103 * Receives the synced history data. An empty list means that either there are | 116 * Receives the synced history data. An empty list means that either there are |
104 * no foreign sessions, or tab sync is disabled for this profile. | 117 * no foreign sessions, or tab sync is disabled for this profile. |
105 * |isTabSyncEnabled| makes it possible to distinguish between the cases. | 118 * |isTabSyncEnabled| makes it possible to distinguish between the cases. |
106 * | 119 * |
107 * @param {!Array<!ForeignSession>} sessionList Array of objects describing the | 120 * @param {!Array<!ForeignSession>} sessionList Array of objects describing the |
108 * sessions from other devices. | 121 * sessions from other devices. |
109 * @param {boolean} isTabSyncEnabled Is tab sync enabled for this profile? | 122 * @param {boolean} isTabSyncEnabled Is tab sync enabled for this profile? |
110 */ | 123 */ |
111 function setForeignSessions(sessionList, isTabSyncEnabled) { | 124 function setForeignSessions(sessionList, isTabSyncEnabled) { |
112 // TODO(calamity): Add a 'no synced devices' message when sessions are empty. | 125 // TODO(calamity): Add a 'no synced devices' message when sessions are empty. |
(...skipping 21 matching lines...) Expand all Loading... |
134 * Called by the history backend when the deletion failed. | 147 * Called by the history backend when the deletion failed. |
135 */ | 148 */ |
136 function deleteFailed() { | 149 function deleteFailed() { |
137 } | 150 } |
138 | 151 |
139 /** | 152 /** |
140 * Called when the history is deleted by someone else. | 153 * Called when the history is deleted by someone else. |
141 */ | 154 */ |
142 function historyDeleted() { | 155 function historyDeleted() { |
143 } | 156 } |
OLD | NEW |