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

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

Issue 1955613002: [MD History] Make side bar always visible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mdh_fuckit_refactor_it_all
Patch Set: Created 4 years, 7 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 | chrome/test/data/webui/md_history/history_synced_tabs_test.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 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 Polymer({ 5 Polymer({
6 is: 'history-app', 6 is: 'history-app',
7 7
8 properties: { 8 properties: {
9 // The id of the currently selected page. 9 // The id of the currently selected page.
10 selectedPage: { 10 selectedPage: {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if (info.finished) 85 if (info.finished)
86 list.disableResultLoading(); 86 list.disableResultLoading();
87 }, 87 },
88 88
89 /** 89 /**
90 * @param {!Array<!ForeignSession>} sessionList Array of objects describing 90 * @param {!Array<!ForeignSession>} sessionList Array of objects describing
91 * the sessions from other devices. 91 * the sessions from other devices.
92 * @param {boolean} isTabSyncEnabled Is tab sync enabled for this profile? 92 * @param {boolean} isTabSyncEnabled Is tab sync enabled for this profile?
93 */ 93 */
94 setForeignSessions: function(sessionList, isTabSyncEnabled) { 94 setForeignSessions: function(sessionList, isTabSyncEnabled) {
95 // TODO(calamity): Add a 'no synced devices' message when sessions are 95 if (!isTabSyncEnabled)
tsergeant 2016/05/05 17:59:09 This TODO is still relevant.
calamity 2016/05/05 18:49:33 Reinstated.
96 // empty. 96 return;
97 this.$['history-side-bar'].hidden = !isTabSyncEnabled; 97
98 var syncedDeviceElem = this.$['history-synced-device-manager']; 98 var syncedDeviceElem = this.$['history-synced-device-manager'];
99 var syncedDeviceManager = 99 var syncedDeviceManager =
100 /** @type {HistorySyncedDeviceManagerElement} */(syncedDeviceElem); 100 /** @type {HistorySyncedDeviceManagerElement} */(syncedDeviceElem);
101 if (isTabSyncEnabled) { 101 syncedDeviceManager.setSyncedHistory(sessionList);
102 syncedDeviceManager.setSyncedHistory(sessionList); 102 /** @type {HistoryToolbarElement} */(this.$.toolbar).hasSidebar = true;
tsergeant 2016/05/05 17:59:09 Can you please change the implementation of histor
calamity 2016/05/05 18:49:33 Good point. Done. I'll remove more of the extraneo
103 /** @type {HistoryToolbarElement} */(this.$.toolbar).hasSidebar = true;
104 }
105 }, 103 },
106 104
107 deleteComplete: function() { 105 deleteComplete: function() {
108 var historyList = /** @type {HistoryListElement} */(this.$['history-list']); 106 var historyList = /** @type {HistoryListElement} */(this.$['history-list']);
109 var toolbar = /** @type {HistoryToolbarElement} */(this.$.toolbar); 107 var toolbar = /** @type {HistoryToolbarElement} */(this.$.toolbar);
110 historyList.removeDeletedHistory(toolbar.count); 108 historyList.removeDeletedHistory(toolbar.count);
111 toolbar.count = 0; 109 toolbar.count = 0;
112 } 110 }
113 }); 111 });
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webui/md_history/history_synced_tabs_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698