| OLD | NEW |
| 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: { | 10 device: { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 for (var i = 0; i < this.tabs.length; i++) | 44 for (var i = 0; i < this.tabs.length; i++) |
| 45 window.open(this.tabs[i].url, '_blank'); | 45 window.open(this.tabs[i].url, '_blank'); |
| 46 }, | 46 }, |
| 47 | 47 |
| 48 /** | 48 /** |
| 49 * Toggles the dropdown display of synced tabs for each device card. | 49 * Toggles the dropdown display of synced tabs for each device card. |
| 50 */ | 50 */ |
| 51 toggleTabCard: function() { | 51 toggleTabCard: function() { |
| 52 this.$.collapse.toggle(); | 52 this.$.collapse.toggle(); |
| 53 this.$['dropdown-indicator'].icon = | 53 this.$['dropdown-indicator'].icon = |
| 54 this.$.collapse.opened ? 'expand-less' : 'expand-more'; | 54 this.$.collapse.opened ? 'cr:expand-less' : 'cr:expand-more'; |
| 55 }, | 55 }, |
| 56 | 56 |
| 57 /** | 57 /** |
| 58 * When the synced tab information is set, the icon associated with the tab | 58 * When the synced tab information is set, the icon associated with the tab |
| 59 * website is also set. | 59 * website is also set. |
| 60 * @private | 60 * @private |
| 61 */ | 61 */ |
| 62 updateIcons_: function() { | 62 updateIcons_: function() { |
| 63 this.async(function() { | 63 this.async(function() { |
| 64 var icons = Polymer.dom(this.root).querySelectorAll('.website-icon'); | 64 var icons = Polymer.dom(this.root).querySelectorAll('.website-icon'); |
| 65 | 65 |
| 66 for (var i = 0; i < this.tabs.length; i++) { | 66 for (var i = 0; i < this.tabs.length; i++) { |
| 67 icons[i].style.backgroundImage = | 67 icons[i].style.backgroundImage = |
| 68 cr.icon.getFaviconImageSet(this.tabs[i].url); | 68 cr.icon.getFaviconImageSet(this.tabs[i].url); |
| 69 } | 69 } |
| 70 }); | 70 }); |
| 71 } | 71 } |
| 72 }); | 72 }); |
| OLD | NEW |