| 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 Polymer({ | 5 Polymer({ |
| 6 is: 'history-app', | 6 is: 'history-app', |
| 7 | 7 |
| 8 properties: { | 8 properties: { |
| 9 showSidebarFooter: Boolean, | 9 showSidebarFooter: Boolean, |
| 10 | 10 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 if (e.command.id == 'delete-command') | 193 if (e.command.id == 'delete-command') |
| 194 this.deleteSelected(); | 194 this.deleteSelected(); |
| 195 }, | 195 }, |
| 196 | 196 |
| 197 /** | 197 /** |
| 198 * @param {!Array<!ForeignSession>} sessionList Array of objects describing | 198 * @param {!Array<!ForeignSession>} sessionList Array of objects describing |
| 199 * the sessions from other devices. | 199 * the sessions from other devices. |
| 200 * @param {boolean} isTabSyncEnabled Is tab sync enabled for this profile? | 200 * @param {boolean} isTabSyncEnabled Is tab sync enabled for this profile? |
| 201 */ | 201 */ |
| 202 setForeignSessions: function(sessionList, isTabSyncEnabled) { | 202 setForeignSessions: function(sessionList, isTabSyncEnabled) { |
| 203 if (!isTabSyncEnabled) | 203 if (!isTabSyncEnabled) { |
| 204 var syncedDeviceManagerElem = |
| 205 /** @type {HistorySyncedDeviceManagerElement} */this |
| 206 .$$('history-synced-device-manager'); |
| 207 if (syncedDeviceManagerElem) |
| 208 syncedDeviceManagerElem.tabSyncDisabled(); |
| 204 return; | 209 return; |
| 210 } |
| 205 | 211 |
| 206 this.set('queryResult_.sessionList', sessionList); | 212 this.set('queryResult_.sessionList', sessionList); |
| 207 }, | 213 }, |
| 208 | 214 |
| 209 /** | 215 /** |
| 210 * Update sign in state of synced device manager after user logs in or out. | 216 * Update sign in state of synced device manager after user logs in or out. |
| 211 * @param {boolean} isUserSignedIn | 217 * @param {boolean} isUserSignedIn |
| 212 */ | 218 */ |
| 213 updateSignInState: function(isUserSignedIn) { | 219 updateSignInState: function(isUserSignedIn) { |
| 214 var syncedDeviceManagerElem = | 220 var syncedDeviceManagerElem = |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 return selectedPage; | 275 return selectedPage; |
| 270 }, | 276 }, |
| 271 | 277 |
| 272 /** @private */ | 278 /** @private */ |
| 273 closeDrawer_: function() { | 279 closeDrawer_: function() { |
| 274 var drawer = this.$$('#drawer'); | 280 var drawer = this.$$('#drawer'); |
| 275 if (drawer) | 281 if (drawer) |
| 276 drawer.close(); | 282 drawer.close(); |
| 277 }, | 283 }, |
| 278 }); | 284 }); |
| OLD | NEW |