Index: chrome/browser/tab_contents/thumbnail_generator.cc |
diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc |
index 162094b85936b01bd7cd204243670ba5e27907e1..3f21d11d23a684d725fef9403eb408eccbe908c3 100644 |
--- a/chrome/browser/tab_contents/thumbnail_generator.cc |
+++ b/chrome/browser/tab_contents/thumbnail_generator.cc |
@@ -502,8 +502,9 @@ void ThumbnailGenerator::UpdateThumbnailIfNecessary( |
Profile* profile = |
Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
history::TopSites* top_sites = profile->GetTopSites(); |
+ bool has_surface = web_contents->GetRenderWidgetHostView()->HasSurface(); |
// Skip if we don't need to update the thumbnail. |
- if (!ShouldUpdateThumbnail(profile, top_sites, url)) |
+ if (!ShouldUpdateThumbnail(profile, top_sites, url, has_surface)) |
return; |
AsyncUpdateThumbnail(web_contents); |
@@ -583,7 +584,10 @@ void ThumbnailGenerator::AsyncUpdateThumbnailFinish( |
bool ThumbnailGenerator::ShouldUpdateThumbnail(Profile* profile, |
history::TopSites* top_sites, |
- const GURL& url) { |
+ const GURL& url, |
+ bool has_surface) { |
+ if (!has_surface) |
+ return false; |
if (!profile || !top_sites) |
return false; |
// Skip if it's in the incognito mode. |