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

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

Issue 2618633002: [MD History] Make first URL on Synced Device page instead of menu button. (Closed)
Patch Set: fix_closure Created 3 years, 11 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 Polymer.dom(this.root) 183 Polymer.dom(this.root)
184 .querySelectorAll('history-synced-device-card') 184 .querySelectorAll('history-synced-device-card')
185 .reduce( 185 .reduce(
186 function(prev, cur) { 186 function(prev, cur) {
187 return prev.concat(cur.createFocusRows()); 187 return prev.concat(cur.createFocusRows());
188 }, 188 },
189 []) 189 [])
190 .forEach(function(row) { 190 .forEach(function(row) {
191 this.focusGrid_.addRow(row); 191 this.focusGrid_.addRow(row);
192 }.bind(this)); 192 }.bind(this));
193 this.focusGrid_.ensureRowActive(); 193 this.focusGrid_.ensureRowActive(1);
194 }); 194 });
195 }, 195 },
196 196
197 /** @private */ 197 /** @private */
198 onDeleteSessionTap_: function() { 198 onDeleteSessionTap_: function() {
199 var menu = assert(this.$.menu.getIfExists()); 199 var menu = assert(this.$.menu.getIfExists());
200 var browserService = md_history.BrowserService.getInstance(); 200 var browserService = md_history.BrowserService.getInstance();
201 browserService.recordHistogram( 201 browserService.recordHistogram(
202 SYNCED_TABS_HISTOGRAM_NAME, SyncedTabsHistogram.HIDE_FOR_NOW, 202 SYNCED_TABS_HISTOGRAM_NAME, SyncedTabsHistogram.HIDE_FOR_NOW,
203 SyncedTabsHistogram.LIMIT); 203 SyncedTabsHistogram.LIMIT);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // User signed in, show the loading message when querying for synced 302 // User signed in, show the loading message when querying for synced
303 // devices. 303 // devices.
304 this.fetchingSyncedTabs_ = true; 304 this.fetchingSyncedTabs_ = true;
305 }, 305 },
306 306
307 searchTermChanged: function(searchTerm) { 307 searchTermChanged: function(searchTerm) {
308 this.clearDisplayedSyncedDevices_(); 308 this.clearDisplayedSyncedDevices_();
309 this.updateSyncedDevices(this.sessionList); 309 this.updateSyncedDevices(this.sessionList);
310 } 310 }
311 }); 311 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698