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

Unified Diff: chrome/browser/resources/md_history/app.js

Issue 1948373002: [MD History] Add routing for synced devices page. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/md_history/app.html ('k') | chrome/browser/resources/md_history/side_bar.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_history/app.js
diff --git a/chrome/browser/resources/md_history/app.js b/chrome/browser/resources/md_history/app.js
index 0d68ff73cf2a85e2e6e4b62ed74c743d8a9261c9..b7461f936b6e35a1cc19460cbd1bb5f7eae21870 100644
--- a/chrome/browser/resources/md_history/app.js
+++ b/chrome/browser/resources/md_history/app.js
@@ -10,6 +10,13 @@ Polymer({
selectedPage: {
type: String,
value: 'history-list'
+ },
+ route: {
+ type: Object
+ },
+ routeData: {
+ type: Object,
+ observer: 'routeChanged_'
}
},
@@ -21,6 +28,17 @@ Polymer({
'search-changed': 'searchChanged',
},
+ routeChanged_: function() {
+ console.log(this.routeData.page);
+ var routeToElementId = {
+ 'openTabs': 'history-synced-device-manager',
+ };
+ var path = this.routeData.page;
+ var elementId =
+ routeToElementId[path] ? routeToElementId[path] : 'history-list';
+ this.$['content'].selected = elementId;
+ },
+
/**
* Listens for history-item being selected or deselected (through checkbox)
* and changes the view of the top toolbar.
@@ -94,7 +112,6 @@ Polymer({
setForeignSessions: function(sessionList, isTabSyncEnabled) {
// TODO(calamity): Add a 'no synced devices' message when sessions are
// empty.
- this.$['history-side-bar'].hidden = !isTabSyncEnabled;
var syncedDeviceElem = this.$['history-synced-device-manager'];
var syncedDeviceManager =
/** @type {HistorySyncedDeviceManagerElement} */(syncedDeviceElem);
« no previous file with comments | « chrome/browser/resources/md_history/app.html ('k') | chrome/browser/resources/md_history/side_bar.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698