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

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

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.cc
diff --git a/chrome/browser/thumbnails/thumbnailing_context.cc b/chrome/browser/thumbnails/thumbnailing_context.cc
index e9ffe6399ca7c448dd594e88b44dcb4581450b17..04765e640550aaadb791ecf188739fa49b4c98ad 100644
--- a/chrome/browser/thumbnails/thumbnailing_context.cc
+++ b/chrome/browser/thumbnails/thumbnailing_context.cc
@@ -12,57 +12,19 @@ namespace thumbnails {
ThumbnailingContext::ThumbnailingContext(content::WebContents* web_contents,
ThumbnailService* receiving_service,
bool load_interrupted)
- : content::WebContentsObserver(web_contents),
- service_(receiving_service),
- clip_result_(CLIP_RESULT_UNPROCESSED) {
- score_.at_top =
+ : service(receiving_service),
+ url(web_contents->GetURL()),
+ clip_result(CLIP_RESULT_UNPROCESSED) {
+ score.at_top =
(web_contents->GetRenderWidgetHostView()->GetLastScrollOffset().y() == 0);
- score_.load_completed = !web_contents->IsLoading() && !load_interrupted;
+ score.load_completed = !web_contents->IsLoading() && !load_interrupted;
}
ThumbnailingContext::ThumbnailingContext()
- : content::WebContentsObserver(nullptr),
- clip_result_(CLIP_RESULT_UNPROCESSED) {
+ : clip_result(CLIP_RESULT_UNPROCESSED) {
}
ThumbnailingContext::~ThumbnailingContext() {
}
-const scoped_refptr<ThumbnailService>& ThumbnailingContext::service() const {
- return service_;
-}
-
-const GURL& ThumbnailingContext::GetURL() const {
- return web_contents()->GetURL();
-}
-
-ClipResult ThumbnailingContext::clip_result() const {
- return clip_result_;
-}
-
-void ThumbnailingContext::set_clip_result(ClipResult result) {
- clip_result_ = result;
-}
-
-gfx::Size ThumbnailingContext::requested_copy_size() {
- return requested_copy_size_;
-}
-
-void ThumbnailingContext::set_requested_copy_size(
- const gfx::Size& requested_size) {
- requested_copy_size_ = requested_size;
-}
-
-ThumbnailScore ThumbnailingContext::score() const {
- return score_;
-}
-
-void ThumbnailingContext::SetBoringScore(double score) {
- score_.boring_score = score;
-}
-
-void ThumbnailingContext::SetGoodClipping(bool is_good_clipping) {
- score_.good_clipping = is_good_clipping;
-}
-
} // namespace thumbnails
« no previous file with comments | « chrome/browser/thumbnails/thumbnailing_context.h ('k') | chrome/browser/thumbnails/thumbnailing_context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698