FaviconFeed.sys.mjs (627B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 import { actionTypes as at } from "resource://newtab/common/Actions.mjs"; 6 import { FaviconProvider } from "resource:///modules/topsites/TopSites.sys.mjs"; 7 8 export class FaviconFeed { 9 constructor() { 10 this.faviconProvider = new FaviconProvider(); 11 } 12 13 onAction(action) { 14 switch (action.type) { 15 case at.RICH_ICON_MISSING: 16 this.faviconProvider.fetchIcon(action.data.url); 17 break; 18 } 19 } 20 }