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

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: Added unit tests. 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 c55920abbf1f0498273a9e53e608a8ecaec2cbf8..1623befba233182917e5245a6c86d0e999fc2afd 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));
}
@@ -243,4 +243,3 @@ void ThumbnailTabHelper::WidgetHidden(RenderWidgetHost* widget) {
return;
UpdateThumbnailIfNecessary(web_contents());
}
-

Powered by Google App Engine
This is Rietveld 408576698