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 f58cec9b879a49fbe0ea21c0c047470168aa99c3..6bbc0aa4c71414a062a1112cfefd07a8c5915381 100644 |
--- a/chrome/browser/resources/md_history/synced_device_card.js |
+++ b/chrome/browser/resources/md_history/synced_device_card.js |
@@ -34,16 +34,30 @@ Polymer({ |
cardOpen_: {type: Boolean, value: true}, |
searchTerm: String, |
+ |
+ windowId: Number, |
tsergeant
2016/07/22 03:21:17
Nit: Newline between these
calamity
2016/07/27 05:22:07
Done.
|
+ sessionTag: String, |
}, |
/** |
* Opens all the tabs displayed on the device in separate tabs. |
+ * @param {Event} e |
+ * @private |
+ */ |
+ openAllTabs_: function(e) { |
tsergeant
2016/07/22 03:21:17
e is unused, you can get rid of it
calamity
2016/07/27 05:22:06
Done.
|
+ md_history.BrowserService.getInstance().openForeignSessionAllTabs( |
+ this.sessionTag); |
+ }, |
+ |
+ /** |
+ * @param {Event} e |
* @private |
*/ |
- openAllTabs_: function() { |
- // TODO(calamity): add a warning if an excessive number of tabs will open. |
- for (var i = 0; i < this.tabs.length; i++) |
- window.open(this.tabs[i].url, '_blank'); |
+ openTab_: function(e) { |
+ var currentTarget = e.currentTarget; |
tsergeant
2016/07/22 03:21:17
You should be able to use `e.model` to avoid stick
calamity
2016/07/27 05:22:07
Done.
|
+ md_history.BrowserService.getInstance().openForeignSessionTab( |
+ this.sessionTag, currentTarget.windowId, currentTarget.sessionId, e); |
+ e.preventDefault(); |
}, |
/** |