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

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

Issue 2280853002: Slightly nicer icon.js APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
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: String, 10 device: String,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 /** 64 /**
65 * When the synced tab information is set, the icon associated with the tab 65 * When the synced tab information is set, the icon associated with the tab
66 * website is also set. 66 * website is also set.
67 * @private 67 * @private
68 */ 68 */
69 updateIcons_: function() { 69 updateIcons_: function() {
70 this.async(function() { 70 this.async(function() {
71 var icons = Polymer.dom(this.root).querySelectorAll('.website-icon'); 71 var icons = Polymer.dom(this.root).querySelectorAll('.website-icon');
72 72
73 for (var i = 0; i < this.tabs.length; i++) { 73 for (var i = 0; i < this.tabs.length; i++) {
74 icons[i].style.backgroundImage = 74 icons[i].style.backgroundImage = cr.icon.getFavicon(this.tabs[i].url);
75 cr.icon.getFaviconImageSet(this.tabs[i].url);
76 } 75 }
77 }); 76 });
78 }, 77 },
79 78
80 /** @private */ 79 /** @private */
81 isWindowSeparatorIndex_: function(index, separatorIndexes) { 80 isWindowSeparatorIndex_: function(index, separatorIndexes) {
82 return this.separatorIndexes.indexOf(index) != -1; 81 return this.separatorIndexes.indexOf(index) != -1;
83 }, 82 },
84 83
85 /** 84 /**
(...skipping 20 matching lines...) Expand all
106 * @private 105 * @private
107 */ 106 */
108 onMenuButtonTap_: function(e) { 107 onMenuButtonTap_: function(e) {
109 this.fire('toggle-menu', { 108 this.fire('toggle-menu', {
110 target: Polymer.dom(e).localTarget, 109 target: Polymer.dom(e).localTarget,
111 tag: this.sessionTag 110 tag: this.sessionTag
112 }); 111 });
113 e.stopPropagation(); // Prevent iron-collapse. 112 e.stopPropagation(); // Prevent iron-collapse.
114 }, 113 },
115 }); 114 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698