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

Unified Diff: chrome/browser/tab_contents/thumbnail_generator.h

Issue 6389001: Add heuristics to skip thumbnail generation when it's unnecessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor cleanup Created 9 years, 11 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/tab_contents/thumbnail_generator.h
diff --git a/chrome/browser/tab_contents/thumbnail_generator.h b/chrome/browser/tab_contents/thumbnail_generator.h
index de57c218ae60bfb0407e569d64e3a3431424e20a..595df3416c9a5e1f012f80f08182e8dbf9bd8d23 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.h
+++ b/chrome/browser/tab_contents/thumbnail_generator.h
@@ -19,10 +19,15 @@
#include "chrome/common/notification_registrar.h"
class GURL;
+class Profile;
class RenderWidgetHost;
class SkBitmap;
class TabContents;
+namespace history {
+class TopSites;
+}
+
class ThumbnailGenerator : NotificationObserver {
public:
typedef Callback1<const SkBitmap&>::Type ThumbnailReadyCallback;
@@ -121,6 +126,11 @@ class ThumbnailGenerator : NotificationObserver {
static void UpdateThumbnailIfNecessary(TabContents* tab_contents,
const GURL& url);
+ // Returns true if we should update the thumbnail of the given URL.
+ static bool ShouldUpdateThumbnail(Profile* profile,
+ history::TopSites* top_sites,
+ const GURL& url);
+
private:
// RenderWidgetHostPaintingObserver implementation.
virtual void WidgetWillDestroyBackingStore(RenderWidgetHost* widget,

Powered by Google App Engine
This is Rietveld 408576698