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

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

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/thumbnail_tab_helper.cc
diff --git a/chrome/browser/thumbnails/thumbnail_tab_helper.cc b/chrome/browser/thumbnails/thumbnail_tab_helper.cc
index 70604082d5db8b8430f5646490012a9341db41b8..4910100c2a3bcb23a8e62553152a2d7e9a19f167 100644
--- a/chrome/browser/thumbnails/thumbnail_tab_helper.cc
+++ b/chrome/browser/thumbnails/thumbnail_tab_helper.cc
@@ -62,8 +62,8 @@ void UpdateThumbnail(const ThumbnailingContext& context,
<< context.score.ToString();
}
-void ProcessCapturedBitmap(ThumbnailingContext* context,
- ThumbnailingAlgorithm* algorithm,
+void ProcessCapturedBitmap(scoped_refptr<ThumbnailingContext> context,
+ scoped_refptr<ThumbnailingAlgorithm> algorithm,
bool succeeded,
const SkBitmap& bitmap) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
@@ -115,11 +115,11 @@ void AsyncProcessThumbnail(content::WebContents* web_contents,
copy_rect.size(),
ui::GetScaleFactorForNativeView(view->GetNativeView()),
&copy_rect,
- &copy_size);
+ &context->requested_copy_size);
render_widget_host->CopyFromBackingStore(
copy_rect,
- copy_size,
+ context->requested_copy_size,
base::Bind(&ProcessCapturedBitmap, context, algorithm));
}
@@ -241,4 +241,3 @@ void ThumbnailTabHelper::WidgetHidden(RenderWidgetHost* widget) {
return;
UpdateThumbnailIfNecessary(web_contents());
}
-
« no previous file with comments | « chrome/browser/thumbnails/thumbnail_service_impl.cc ('k') | chrome/browser/thumbnails/thumbnailing_algorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698