android-components / mozilla.components.browser.icons.processor / IconProcessor


interface IconProcessor (source)

An IconProcessor implementation receives the Icon with the IconRequest and IconRequest.Resource after the icon was loaded. The IconProcessor has the option to rewrite a loaded Icon and return a new instance.


Name Summary
process abstract fun process(context: <ERROR CLASS>, request: IconRequest, resource: Resource?, icon: Icon, desiredSize: DesiredSize): Icon?

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.


Name Summary
AdaptiveIconProcessor class AdaptiveIconProcessor : IconProcessor
IconProcessor implementation that builds maskable icons.
ColorProcessor class ColorProcessor : IconProcessor
IconProcessor implementation to extract the dominant color from the icon.
DiskIconProcessor class DiskIconProcessor : IconProcessor
IconProcessor implementation that saves icons in the disk cache.
MemoryIconProcessor class MemoryIconProcessor : IconProcessor
An IconProcessor implementation that saves icons in the in-memory cache.
ResizingProcessor class ResizingProcessor : IconProcessor
IconProcessor implementation for resizing the loaded icon based on the target size.