| 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 /** @type {Promise} */ | 10 /** @type {Promise} */ |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 waitForAppUpgrade().then(function() { | 88 waitForAppUpgrade().then(function() { |
| 89 /** @type {HistoryAppElement} */($('history-app')) | 89 /** @type {HistoryAppElement} */($('history-app')) |
| 90 .setForeignSessions(sessionList, isTabSyncEnabled); | 90 .setForeignSessions(sessionList, isTabSyncEnabled); |
| 91 }); | 91 }); |
| 92 } | 92 } |
| 93 | 93 |
| 94 /** | 94 /** |
| 95 * Called when the history is deleted by someone else. | 95 * Called when the history is deleted by someone else. |
| 96 */ | 96 */ |
| 97 function historyDeleted() { | 97 function historyDeleted() { |
| 98 waitForAppUpgrade().then(function() { |
| 99 /** @type {HistoryAppElement} */($('history-app')) |
| 100 .historyDeleted(); |
| 101 }); |
| 98 } | 102 } |
| 99 | 103 |
| 100 /** | 104 /** |
| 101 * Called by the history backend after user's sign in state changes. | 105 * Called by the history backend after user's sign in state changes. |
| 102 * @param {boolean} isUserSignedIn Whether user is signed in or not now. | 106 * @param {boolean} isUserSignedIn Whether user is signed in or not now. |
| 103 */ | 107 */ |
| 104 function updateSignInState(isUserSignedIn) { | 108 function updateSignInState(isUserSignedIn) { |
| 105 waitForAppUpgrade().then(function() { | 109 waitForAppUpgrade().then(function() { |
| 106 /** @type {HistoryAppElement} */($('history-app')) | 110 /** @type {HistoryAppElement} */($('history-app')) |
| 107 .updateSignInState(isUserSignedIn); | 111 .updateSignInState(isUserSignedIn); |
| 108 }); | 112 }); |
| 109 } | 113 } |
| OLD | NEW |