Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Side by Side Diff: chrome/browser/resources/md_history/synced_device_manager.js

Issue 2191173003: MD History: Get sign in state from backend when refreshing the page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698