Index: chrome/browser/thumbnails/thumbnailing_context.h |
diff --git a/chrome/browser/thumbnails/thumbnailing_context.h b/chrome/browser/thumbnails/thumbnailing_context.h |
index 41735606244fedc79215dfb521712e841efaed98..877a2eafee08afb0ba2d4508ca6ec48ed41d0ff8 100644 |
--- a/chrome/browser/thumbnails/thumbnailing_context.h |
+++ b/chrome/browser/thumbnails/thumbnailing_context.h |
@@ -10,6 +10,7 @@ |
#include "chrome/browser/thumbnails/thumbnail_service.h" |
#include "chrome/common/thumbnail_score.h" |
#include "content/public/browser/web_contents.h" |
+#include "ui/gfx/size.h" |
namespace thumbnails { |
@@ -28,6 +29,8 @@ enum ClipResult { |
CLIP_RESULT_TALLER_THAN_WIDE, |
// The source and destination aspect ratios are identical. |
CLIP_RESULT_NOT_CLIPPED, |
+ // The source and destination are identical. |
+ CLIP_RESULT_SOURCE_SAME_AS_TARGET, |
}; |
// Holds the information needed for processing a thumbnail. |
@@ -36,13 +39,21 @@ struct ThumbnailingContext : base::RefCountedThreadSafe<ThumbnailingContext> { |
ThumbnailService* receiving_service, |
bool load_interrupted); |
+ // Create an instance for use with unit tests. |
+ static ThumbnailingContext* CreateThumbnailingContextForTest() { |
+ return new ThumbnailingContext(); |
+ } |
+ |
scoped_refptr<ThumbnailService> service; |
GURL url; |
ClipResult clip_result; |
+ gfx::Size requested_copy_size; |
ThumbnailScore score; |
private: |
+ ThumbnailingContext(); |
~ThumbnailingContext(); |
+ |
friend class base::RefCountedThreadSafe<ThumbnailingContext>; |
}; |