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

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

Issue 2361513003: MD History: Update sign in state in data source (Closed)
Patch Set: try another approach Created 4 years, 2 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
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 * opened: boolean, 8 * opened: boolean,
9 * separatorIndexes: !Array<number>, 9 * separatorIndexes: !Array<number>,
10 * timestamp: number, 10 * timestamp: number,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 hasSeenForeignData_: Boolean, 60 hasSeenForeignData_: Boolean,
61 }, 61 },
62 62
63 listeners: { 63 listeners: {
64 'toggle-menu': 'onToggleMenu_', 64 'toggle-menu': 'onToggleMenu_',
65 'scroll': 'onListScroll_' 65 'scroll': 'onListScroll_'
66 }, 66 },
67 67
68 /** @override */ 68 /** @override */
69 attached: function() { 69 attached: function() {
70 // Update the sign in state.
71 chrome.send('otherDevicesInitialized');
calamity 2016/09/28 02:54:23 You can keep this in and then AllowJavascript() in
lshang 2016/09/29 08:06:47 Done. Good idea
72 md_history.BrowserService.getInstance().recordHistogram( 70 md_history.BrowserService.getInstance().recordHistogram(
73 SYNCED_TABS_HISTOGRAM_NAME, SyncedTabsHistogram.INITIALIZED, 71 SYNCED_TABS_HISTOGRAM_NAME, SyncedTabsHistogram.INITIALIZED,
74 SyncedTabsHistogram.LIMIT); 72 SyncedTabsHistogram.LIMIT);
75 }, 73 },
76 74
77 /** @return {HTMLElement} */ 75 /** @return {HTMLElement} */
78 getContentScrollTarget: function() { return this; }, 76 getContentScrollTarget: function() { return this; },
79 77
80 /** 78 /**
81 * @param {!ForeignSession} session 79 * @param {!ForeignSession} session
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 // User signed in, show the loading message when querying for synced 279 // User signed in, show the loading message when querying for synced
282 // devices. 280 // devices.
283 this.fetchingSyncedTabs_ = true; 281 this.fetchingSyncedTabs_ = true;
284 }, 282 },
285 283
286 searchTermChanged: function(searchTerm) { 284 searchTermChanged: function(searchTerm) {
287 this.clearDisplayedSyncedDevices_(); 285 this.clearDisplayedSyncedDevices_();
288 this.updateSyncedDevices(this.sessionList); 286 this.updateSyncedDevices(this.sessionList);
289 } 287 }
290 }); 288 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698