Index: chrome/browser/thumbnails/thumbnail_tab_helper.h |
diff --git a/chrome/browser/thumbnails/thumbnail_tab_helper.h b/chrome/browser/thumbnails/thumbnail_tab_helper.h |
index df9a731da1adaf3b3d8b551015a118608715b40b..5723bb2d86e6bb6315e285faed179207562ca2e9 100644 |
--- a/chrome/browser/thumbnails/thumbnail_tab_helper.h |
+++ b/chrome/browser/thumbnails/thumbnail_tab_helper.h |
@@ -6,6 +6,7 @@ |
#define CHROME_BROWSER_THUMBNAILS_THUMBNAIL_TAB_HELPER_H_ |
#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
#include "chrome/browser/thumbnails/thumbnailing_context.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
@@ -39,8 +40,26 @@ class ThumbnailTabHelper |
void DidStartLoading() override; |
void NavigationStopped() override; |
+ // Clean up after thumbnail generation has ended. |
Lei Zhang
2016/01/12 01:54:46
Might be good to put this list in chronological or
shrike
2016/01/12 19:52:39
OK.
|
+ void CleanUpFromThumbnailGeneration(); |
+ |
+ // Pass the thumbnail to the thumbnail service. |
+ void UpdateThumbnail( |
+ const thumbnails::ThumbnailingContext& context, |
+ const SkBitmap& thumbnail); |
+ |
+ // Create a thumbnail from the web contents bitmap. |
+ void ProcessCapturedBitmap( |
+ scoped_refptr<thumbnails::ThumbnailingAlgorithm> algorithm, |
+ const SkBitmap& bitmap, |
+ content::ReadbackResponse response); |
+ |
+ // Initiate asynchronous generation of a thumbnail from the web contents. |
+ void AsyncProcessThumbnail( |
+ scoped_refptr<thumbnails::ThumbnailService> thumbnail_service); |
+ |
// Update the thumbnail of the given tab contents if necessary. |
- void UpdateThumbnailIfNecessary(content::WebContents* web_contents); |
+ void UpdateThumbnailIfNecessary(); |
// Called when a render view host was created for a WebContents. |
void RenderViewHostCreated(content::RenderViewHost* renderer); |
@@ -49,9 +68,12 @@ class ThumbnailTabHelper |
void WidgetHidden(content::RenderWidgetHost* widget); |
content::NotificationRegistrar registrar_; |
+ scoped_refptr<thumbnails::ThumbnailingContext> thumbnailing_context_; |
bool load_interrupted_; |
+ base::WeakPtrFactory<ThumbnailTabHelper> weak_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ThumbnailTabHelper); |
}; |