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

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

Issue 1348833003: Fix NTP thumbnail generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix NTP thumbnail generation using IncrementCapturerCount Created 5 years, 3 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 | « no previous file | chrome/browser/thumbnails/thumbnailing_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/thumbnails/thumbnail_tab_helper.cc
diff --git a/chrome/browser/thumbnails/thumbnail_tab_helper.cc b/chrome/browser/thumbnails/thumbnail_tab_helper.cc
index f8322e76f9a2d9573939dea942a32fe342b8bffb..5b95c8d77bdc23aa6b97a8e651f23ca17fe3fa85 100644
--- a/chrome/browser/thumbnails/thumbnail_tab_helper.cc
+++ b/chrome/browser/thumbnails/thumbnail_tab_helper.cc
@@ -74,6 +74,8 @@ void ProcessCapturedBitmap(scoped_refptr<ThumbnailingContext> context,
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
algorithm->ProcessBitmap(context, base::Bind(&UpdateThumbnail), bitmap);
+
+ context->web_contents->DecrementCapturerCount();
danakj 2015/09/17 17:54:14 Do you not want to do this if the result wasn't SU
shrike 2015/09/28 21:24:11 Thank you for catching that. Done.
}
void AsyncProcessThumbnail(content::WebContents* web_contents,
@@ -196,6 +198,9 @@ void ThumbnailTabHelper::UpdateThumbnailIfNecessary(
return;
}
+ gfx::Size empty_size;
danakj 2015/09/17 17:54:14 you could just pass the gfx::Size() directly if th
shrike 2015/09/28 21:24:11 Yeah, you're right about passing it directly. And
+ web_contents->IncrementCapturerCount(empty_size);
+
scoped_refptr<thumbnails::ThumbnailingAlgorithm> algorithm(
thumbnail_service->GetThumbnailingAlgorithm());
« no previous file with comments | « no previous file | chrome/browser/thumbnails/thumbnailing_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698