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

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

Issue 1450083002: Revert "Fix NTP thumbnail generation" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove thumbnailing context unittest. Created 5 years, 1 month 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 fa42e7f3ea22590f1e61b7846c5cad69dcee7515..1cfe67178aeb2a2270510a0da26cb12058efddb8 100644
--- a/chrome/browser/thumbnails/thumbnailing_context.h
+++ b/chrome/browser/thumbnails/thumbnailing_context.h
@@ -10,7 +10,6 @@
#include "chrome/browser/thumbnails/thumbnail_service.h"
#include "components/history/core/common/thumbnail_score.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_observer.h"
#include "ui/gfx/geometry/size.h"
namespace thumbnails {
@@ -35,10 +34,7 @@ enum ClipResult {
};
// Holds the information needed for processing a thumbnail.
-class ThumbnailingContext
- : public base::RefCountedThreadSafe<ThumbnailingContext>,
- public content::WebContentsObserver {
- public:
+struct ThumbnailingContext : base::RefCountedThreadSafe<ThumbnailingContext> {
ThumbnailingContext(content::WebContents* web_contents,
ThumbnailService* receiving_service,
bool load_interrupted);
@@ -48,30 +44,17 @@ class ThumbnailingContext
return new ThumbnailingContext();
}
- const scoped_refptr<ThumbnailService>& service() const;
-
- const GURL& GetURL() const;
-
- ClipResult clip_result() const;
- void set_clip_result(ClipResult result);
-
- gfx::Size requested_copy_size();
- void set_requested_copy_size(const gfx::Size& requested_size);
-
- ThumbnailScore score() const;
- void SetBoringScore(double score);
- void SetGoodClipping(bool is_good_clipping);
+ scoped_refptr<ThumbnailService> service;
+ GURL url;
+ ClipResult clip_result;
+ gfx::Size requested_copy_size;
+ ThumbnailScore score;
private:
ThumbnailingContext();
- ~ThumbnailingContext() override;
+ ~ThumbnailingContext();
friend class base::RefCountedThreadSafe<ThumbnailingContext>;
-
- scoped_refptr<ThumbnailService> service_;
- ClipResult clip_result_;
- gfx::Size requested_copy_size_;
- ThumbnailScore score_;
};
} // namespace thumbnails
« no previous file with comments | « chrome/browser/thumbnails/thumbnail_tab_helper.cc ('k') | chrome/browser/thumbnails/thumbnailing_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698