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

Unified Diff: components/favicon_base/favicon_types.h

Issue 1092873002: [Icons NTP] Refactor large_icon_source to extract the logic shared between desktop and Android to f… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « components/favicon_base/favicon_callback.h ('k') | components/favicon_base/favicon_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/favicon_base/favicon_types.h
diff --git a/components/favicon_base/favicon_types.h b/components/favicon_base/favicon_types.h
index ea6475429d93d931fb9f511fbe24adaa16ccd38e..f7c812abcff54c4e1c86bc16b90f56f1af91f2a7 100644
--- a/components/favicon_base/favicon_types.h
+++ b/components/favicon_base/favicon_types.h
@@ -6,12 +6,15 @@
#define COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_
#include "base/memory/ref_counted_memory.h"
+#include "base/memory/scoped_ptr.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image.h"
#include "url/gurl.h"
namespace favicon_base {
+struct FallbackIconStyle;
+
typedef int64 FaviconID;
// Defines the icon types. They are also stored in icon_type field of favicons
@@ -72,6 +75,22 @@ struct FaviconRawBitmapResult {
// HistoryBackend::SetFavicons().
typedef FaviconRawBitmapResult FaviconRawBitmapData;
+// Result returned by LargeIconService::GetLargeIconOrFallbackStyle(). Contains
+// either the bitmap data if the favicon database has a sufficiently large
+// favicon bitmap and the style of the fallback icon otherwise.
+struct LargeIconResult {
+ LargeIconResult();
+ ~LargeIconResult();
+
+ // The bitmap from the favicon database if the database has a sufficiently
+ // large one.
+ FaviconRawBitmapResult bitmap;
+
+ // 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.
+ scoped_ptr<FallbackIconStyle> fallback_icon_style;
+};
+
} // namespace favicon_base
#endif // COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_
« no previous file with comments | « components/favicon_base/favicon_callback.h ('k') | components/favicon_base/favicon_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698