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

Unified Diff: chrome/browser/thumbnails/thumbnailing_context.h

Issue 15458003: Plugs in the new thumbnailing algorithm to ThumbnailTabHelper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed up a compile problem (indpendent change). Created 7 years, 7 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: 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>;
};
« no previous file with comments | « chrome/browser/thumbnails/thumbnailing_algorithm.h ('k') | chrome/browser/thumbnails/thumbnailing_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698