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

Unified Diff: components/favicon_base/favicon_types.h

Issue 2784233003: [LargeIconService] Allow decoding of images in the service (Closed)
Patch Set: Minor changes #2 Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: components/favicon_base/favicon_types.h
diff --git a/components/favicon_base/favicon_types.h b/components/favicon_base/favicon_types.h
index 6a399cefe0ebb4e03e6000ea79e6480a60862805..47c63aeb6fa0aca7d02999e5c5db8b622e90b4bc 100644
--- a/components/favicon_base/favicon_types.h
+++ b/components/favicon_base/favicon_types.h
@@ -99,6 +99,26 @@ struct LargeIconResult {
std::unique_ptr<FallbackIconStyle> fallback_icon_style;
};
+// Result returned by LargeIconService::GetLargeIconImageOrFallbackStyle().
+// Contains either the gfx::Image if the favicon database has a sufficiently
+// large favicon bitmap and the style of the fallback icon otherwise.
+struct LargeIconImageResult {
+ explicit LargeIconImageResult(const gfx::Image& image_in);
+
+ // Takes ownership of |fallback_icon_style_in|.
+ explicit LargeIconImageResult(FallbackIconStyle* fallback_icon_style_in);
+
+ ~LargeIconImageResult();
+
+ // The image from the favicon database if the database has a sufficiently
+ // large one.
+ gfx::Image image;
+
+ // The fallback icon style if a sufficiently large icon isn't available. This
+ // uses the dominant color of a smaller icon as the background if available.
+ std::unique_ptr<FallbackIconStyle> fallback_icon_style;
+};
+
} // namespace favicon_base
#endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_

Powered by Google App Engine
This is Rietveld 408576698