| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 /** | 5 /** |
| 6 * @typedef {{querying: boolean, | 6 * @typedef {{querying: boolean, |
| 7 * searchTerm: string, | 7 * searchTerm: string, |
| 8 * results: ?Array<!HistoryEntry>, | 8 * results: ?Array<!HistoryEntry>, |
| 9 * info: ?HistoryQuery, | 9 * info: ?HistoryQuery, |
| 10 * incremental: boolean, | 10 * incremental: boolean, |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 * @return {string} | 218 * @return {string} |
| 219 */ | 219 */ |
| 220 getSelectedPage: function(selectedPage, range) { | 220 getSelectedPage: function(selectedPage, range) { |
| 221 if (selectedPage == 'history-list' && range != HistoryRange.ALL_TIME) | 221 if (selectedPage == 'history-list' && range != HistoryRange.ALL_TIME) |
| 222 return 'history-grouped-list'; | 222 return 'history-grouped-list'; |
| 223 | 223 |
| 224 return selectedPage; | 224 return selectedPage; |
| 225 }, | 225 }, |
| 226 | 226 |
| 227 /** | 227 /** |
| 228 * Update sign in state of synced device manager after user logs in or out. |
| 229 * @param {boolean} isUserSignedIn |
| 230 */ |
| 231 updateSignInState: function(isUserSignedIn) { |
| 232 var syncedDeviceManagerElem = |
| 233 /** @type {HistorySyncedDeviceManagerElement} */this |
| 234 .$$('history-synced-device-manager'); |
| 235 syncedDeviceManagerElem.updateSignInState(isUserSignedIn); |
| 236 }, |
| 237 |
| 238 /** |
| 228 * @param {string} selectedPage | 239 * @param {string} selectedPage |
| 229 * @return {boolean} | 240 * @return {boolean} |
| 230 * @private | 241 * @private |
| 231 */ | 242 */ |
| 232 syncedTabsSelected_: function(selectedPage) { | 243 syncedTabsSelected_: function(selectedPage) { |
| 233 return selectedPage == 'history-synced-device-manager'; | 244 return selectedPage == 'history-synced-device-manager'; |
| 234 }, | 245 }, |
| 235 | 246 |
| 236 /** | 247 /** |
| 237 * @param {boolean} querying | 248 * @param {boolean} querying |
| 238 * @param {boolean} incremental | 249 * @param {boolean} incremental |
| 239 * @param {string} searchTerm | 250 * @param {string} searchTerm |
| 240 * @return {boolean} Whether a loading spinner should be shown (implies the | 251 * @return {boolean} Whether a loading spinner should be shown (implies the |
| 241 * backend is querying a new search term). | 252 * backend is querying a new search term). |
| 242 * @private | 253 * @private |
| 243 */ | 254 */ |
| 244 shouldShowSpinner_: function(querying, incremental, searchTerm) { | 255 shouldShowSpinner_: function(querying, incremental, searchTerm) { |
| 245 return querying && !incremental && searchTerm != ''; | 256 return querying && !incremental && searchTerm != ''; |
| 246 } | 257 } |
| 247 }); | 258 }); |
| OLD | NEW |