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

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

Issue 1461463002: Reland fix for thumbnail generation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rework how ignore spurrious thumbnail generation requests. Created 5 years, 1 month 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.h
diff --git a/chrome/browser/thumbnails/thumbnail_tab_helper.h b/chrome/browser/thumbnails/thumbnail_tab_helper.h
index ae13bbb73d2b44bc5b38f8d808c7c83c6376902f..9e95b462b56639081de4908dd40d577828f6f75d 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/basictypes.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"
@@ -25,6 +26,8 @@ class ThumbnailTabHelper
public:
~ThumbnailTabHelper() override;
+ void set_thumbnail_generation_in_progress(bool flag);
+
private:
explicit ThumbnailTabHelper(content::WebContents* contents);
friend class content::WebContentsUserData<ThumbnailTabHelper>;
@@ -51,6 +54,9 @@ class ThumbnailTabHelper
content::NotificationRegistrar registrar_;
bool load_interrupted_;
+ bool thumbnail_generation_in_progress_;
+
+ base::WeakPtrFactory<ThumbnailTabHelper> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(ThumbnailTabHelper);
};

Powered by Google App Engine
This is Rietveld 408576698