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

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..562fbcec070f008ee95d675f8a07e95c5f8cd580 100644
--- a/components/favicon_base/favicon_types.h
+++ b/components/favicon_base/favicon_types.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_
#define COMPONENTS_FAVICON_BASE_FAVICON_TYPES_H_
+#include <base/memory/scoped_ptr.h>
+
#include "base/memory/ref_counted_memory.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image.h"
@@ -12,6 +14,8 @@
namespace favicon_base {
+struct FallbackIconStyle;
+
typedef int64 FaviconID;
// Defines the icon types. They are also stored in icon_type field of favicons
@@ -72,6 +76,20 @@ struct FaviconRawBitmapResult {
// HistoryBackend::SetFavicons().
typedef FaviconRawBitmapResult FaviconRawBitmapData;
+// Result returned when accessing a large icon, which is either a bitmap if
+// one was available; or the style of the fallback icon otherwise.
+struct LargeIconResult {
+ LargeIconResult();
+ ~LargeIconResult();
+
+ // The bitmap of the large icon if available.
+ FaviconRawBitmapResult bitmap;
+
+ // The fallback icon style if a 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;
pkotwicz 2015/04/21 18:19:47 I wonder whether the API would be easier to unders
pkotwicz 2015/04/21 20:13:28 Ping on this comment
beaudoin 2015/04/21 20:24:05 Sorry missed that comment. Even though I only ever
+};
+
} // 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