| 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 {{device: string, | 6 * @typedef {{device: string, |
| 7 * lastUpdateTime: string, | 7 * lastUpdateTime: string, |
| 8 * separatorIndexes: !Array<number>, | 8 * separatorIndexes: !Array<number>, |
| 9 * timestamp: number, | 9 * timestamp: number, |
| 10 * tabs: !Array<!ForeignSessionTab>, | 10 * tabs: !Array<!ForeignSessionTab>, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 value: loadTimeData.getBoolean('isGuestSession'), | 50 value: loadTimeData.getBoolean('isGuestSession'), |
| 51 }, | 51 }, |
| 52 | 52 |
| 53 /** @private */ | 53 /** @private */ |
| 54 fetchingSyncedTabs_: { | 54 fetchingSyncedTabs_: { |
| 55 type: Boolean, | 55 type: Boolean, |
| 56 value: false, | 56 value: false, |
| 57 } | 57 } |
| 58 }, | 58 }, |
| 59 | 59 |
| 60 /** @override */ |
| 61 attached: function() { |
| 62 // Update the sign in state. |
| 63 chrome.send('otherDevicesInitialized'); |
| 64 }, |
| 65 |
| 60 /** | 66 /** |
| 61 * @param {!ForeignSession} session | 67 * @param {!ForeignSession} session |
| 62 * @return {!ForeignDeviceInternal} | 68 * @return {!ForeignDeviceInternal} |
| 63 */ | 69 */ |
| 64 createInternalDevice_: function(session) { | 70 createInternalDevice_: function(session) { |
| 65 var tabs = []; | 71 var tabs = []; |
| 66 var separatorIndexes = []; | 72 var separatorIndexes = []; |
| 67 for (var i = 0; i < session.windows.length; i++) { | 73 for (var i = 0; i < session.windows.length; i++) { |
| 68 var windowId = session.windows[i].sessionId; | 74 var windowId = session.windows[i].sessionId; |
| 69 var newTabs = session.windows[i].tabs; | 75 var newTabs = session.windows[i].tabs; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // User signed in, show the loading message when querying for synced | 210 // User signed in, show the loading message when querying for synced |
| 205 // devices. | 211 // devices. |
| 206 this.fetchingSyncedTabs_ = true; | 212 this.fetchingSyncedTabs_ = true; |
| 207 }, | 213 }, |
| 208 | 214 |
| 209 searchTermChanged: function(searchTerm) { | 215 searchTermChanged: function(searchTerm) { |
| 210 this.clearDisplayedSyncedDevices_(); | 216 this.clearDisplayedSyncedDevices_(); |
| 211 this.updateSyncedDevices(this.sessionList); | 217 this.updateSyncedDevices(this.sessionList); |
| 212 } | 218 } |
| 213 }); | 219 }); |
| OLD | NEW |