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

Side by Side Diff: chrome/browser/resources/history/other_devices.js

Issue 2517243002: [Sync] Removing complexity around PROXY_TABS now that empty sessions are provided when disabled. (Closed)
Patch Set: Rebase and re-vulcanize after conflict. Created 4 years 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 | chrome/browser/resources/md_history/app.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 * @fileoverview The section of the history page that shows tabs from sessions 6 * @fileoverview The section of the history page that shows tabs from sessions
7 on other devices. 7 on other devices.
8 */ 8 */
9 9
10 /////////////////////////////////////////////////////////////////////////////// 10 ///////////////////////////////////////////////////////////////////////////////
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 grid.addRow(new DevicesViewFocusRow(rows[j], devices[i])); 534 grid.addRow(new DevicesViewFocusRow(rows[j], devices[i]));
535 } 535 }
536 grid.ensureRowActive(); 536 grid.ensureRowActive();
537 this.focusGrids_.push(grid); 537 this.focusGrids_.push(grid);
538 } 538 }
539 }; 539 };
540 540
541 /** 541 /**
542 * Sets the menu model data. An empty list means that either there are no 542 * Sets the menu model data. An empty list means that either there are no
543 * foreign sessions, or tab sync is disabled for this profile. 543 * foreign sessions, or tab sync is disabled for this profile.
544 * |isTabSyncEnabled| makes it possible to distinguish between the cases.
545 * 544 *
546 * @param {Array} sessionList Array of objects describing the sessions 545 * @param {Array} sessionList Array of objects describing the sessions
547 * from other devices. 546 * from other devices.
548 * @param {boolean} isTabSyncEnabled Is tab sync enabled for this profile?
549 */ 547 */
550 function setForeignSessions(sessionList, isTabSyncEnabled) { 548 function setForeignSessions(sessionList) {
551 // The other devices is shown iff tab sync is enabled. 549 devicesView.setSessionList(sessionList);
552 if (isTabSyncEnabled)
553 devicesView.setSessionList(sessionList);
554 else
555 devicesView.clearDOM();
556 } 550 }
557 551
558 /** 552 /**
559 * Called when initialized or the user's signed in state changes, 553 * Called when initialized or the user's signed in state changes,
560 * @param {boolean} isUserSignedIn Is the user currently signed in? 554 * @param {boolean} isUserSignedIn Is the user currently signed in?
561 */ 555 */
562 function updateSignInState(isUserSignedIn) { 556 function updateSignInState(isUserSignedIn) {
563 if (devicesView) 557 if (devicesView)
564 devicesView.updateSignInState(isUserSignedIn); 558 devicesView.updateSignInState(isUserSignedIn);
565 } 559 }
(...skipping 17 matching lines...) Expand all
583 devicesView.setSearchText($('search-field').value); 577 devicesView.setSearchText($('search-field').value);
584 }; 578 };
585 $('search-field').addEventListener('search', doSearch); 579 $('search-field').addEventListener('search', doSearch);
586 $('search-button').addEventListener('click', doSearch); 580 $('search-button').addEventListener('click', doSearch);
587 581
588 chrome.send('otherDevicesInitialized'); 582 chrome.send('otherDevicesInitialized');
589 } 583 }
590 584
591 // Add handlers to HTML elements. 585 // Add handlers to HTML elements.
592 document.addEventListener('DOMContentLoaded', load); 586 document.addEventListener('DOMContentLoaded', load);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/md_history/app.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698