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

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

Issue 2022003002: [MD History] Add search for synced devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@land_icons
Patch Set: rebase, clang-format, add annotation Created 4 years, 6 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
Index: chrome/browser/resources/md_history/synced_device_card.js
diff --git a/chrome/browser/resources/md_history/synced_device_card.js b/chrome/browser/resources/md_history/synced_device_card.js
index 4b01791c3551e8b0f16a840a60dd3ba4272f559b..42c6a0f09603cbeb8c2ad55dc1d7fbe6f98ed1ab 100644
--- a/chrome/browser/resources/md_history/synced_device_card.js
+++ b/chrome/browser/resources/md_history/synced_device_card.js
@@ -7,16 +7,10 @@ Polymer({
properties: {
// Name of the synced device.
- device: {
- type: String,
- value: ''
- },
+ device: {type: String, value: ''},
// When the device information was last updated.
- lastUpdateTime: {
- type: String,
- value: ''
- },
+ lastUpdateTime: {type: String, value: ''},
/**
* The list of tabs open for this device.
@@ -28,11 +22,16 @@ Polymer({
observer: 'updateIcons_'
},
+ /**
+ * The indexes where a window separator should be shown. The use of a
+ * separate array here is necessary for window separators to appear
+ * correctly in search. See http://crrev.com/2022003002 for more details.
+ * @type {!Array<number>}
+ */
+ separatorIndexes: Array,
+
// Whether the card is open.
- cardOpen_: {
- type: Boolean,
- value: true
- },
+ cardOpen_: {type: Boolean, value: true},
},
/**
@@ -68,5 +67,10 @@ Polymer({
cr.icon.getFaviconImageSet(this.tabs[i].url);
}
});
+ },
+
+ /** @private */
+ isWindowSeparatorIndex_: function(index, separatorIndexes) {
+ return this.separatorIndexes.indexOf(index) != -1;
}
});

Powered by Google App Engine
This is Rietveld 408576698