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

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

Issue 2195593002: MD History: Fix clicking on synced tab links (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix closure Created 4 years, 4 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-synced-device-card', 6 is: 'history-synced-device-card',
7 7
8 properties: { 8 properties: {
9 // Name of the synced device. 9 // Name of the synced device.
10 device: {type: String, value: ''}, 10 device: {type: String, value: ''},
(...skipping 17 matching lines...) Expand all
28 * correctly in search. See http://crrev.com/2022003002 for more details. 28 * correctly in search. See http://crrev.com/2022003002 for more details.
29 * @type {!Array<number>} 29 * @type {!Array<number>}
30 */ 30 */
31 separatorIndexes: Array, 31 separatorIndexes: Array,
32 32
33 // Whether the card is open. 33 // Whether the card is open.
34 cardOpen_: {type: Boolean, value: true}, 34 cardOpen_: {type: Boolean, value: true},
35 35
36 searchTerm: String, 36 searchTerm: String,
37 37
38 windowId: Number,
39
40 sessionTag: String, 38 sessionTag: String,
41 }, 39 },
42 40
43 /** 41 /**
44 * Opens all the tabs displayed on the device in separate tabs. 42 * Opens all the tabs displayed on the device in separate tabs.
45 * @private 43 * @private
46 */ 44 */
47 openAllTabs_: function() { 45 openAllTabs_: function() {
48 md_history.BrowserService.getInstance().openForeignSessionAllTabs( 46 md_history.BrowserService.getInstance().openForeignSessionAllTabs(
49 this.sessionTag); 47 this.sessionTag);
50 }, 48 },
51 49
52 /** 50 /**
53 * @param {TapEvent} e 51 * @param {TapEvent} e
54 * @private 52 * @private
55 */ 53 */
56 openTab_: function(e) { 54 openTab_: function(e) {
57 var model = /** @type {ForeignSessionTab} */(e.model); 55 var tab = /** @type {ForeignSessionTab} */(e.model.tab);
58 var srcEvent = /** @type {Event} */(e.detail.sourceEvent); 56 var srcEvent = /** @type {Event} */(e.detail.sourceEvent);
59 md_history.BrowserService.getInstance().openForeignSessionTab( 57 md_history.BrowserService.getInstance().openForeignSessionTab(
60 this.sessionTag, model.windowId, model.sessionId, srcEvent); 58 this.sessionTag, tab.windowId, tab.sessionId, srcEvent);
61 e.preventDefault(); 59 e.preventDefault();
62 }, 60 },
63 61
64 /** 62 /**
65 * Toggles the dropdown display of synced tabs for each device card. 63 * Toggles the dropdown display of synced tabs for each device card.
66 */ 64 */
67 toggleTabCard: function() { 65 toggleTabCard: function() {
68 this.$.collapse.toggle(); 66 this.$.collapse.toggle();
69 this.$['dropdown-indicator'].icon = 67 this.$['dropdown-indicator'].icon =
70 this.$.collapse.opened ? 'cr:expand-less' : 'cr:expand-more'; 68 this.$.collapse.opened ? 'cr:expand-less' : 'cr:expand-more';
(...skipping 13 matching lines...) Expand all
84 cr.icon.getFaviconImageSet(this.tabs[i].url); 82 cr.icon.getFaviconImageSet(this.tabs[i].url);
85 } 83 }
86 }); 84 });
87 }, 85 },
88 86
89 /** @private */ 87 /** @private */
90 isWindowSeparatorIndex_: function(index, separatorIndexes) { 88 isWindowSeparatorIndex_: function(index, separatorIndexes) {
91 return this.separatorIndexes.indexOf(index) != -1; 89 return this.separatorIndexes.indexOf(index) != -1;
92 } 90 }
93 }); 91 });
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