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

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

Issue 2093113003: Clean up the RWHVMac to ui::Compositor interface (phase 1 of 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove hack Created 4 years, 6 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
« no previous file with comments | « no previous file | content/browser/renderer_host/browser_compositor_view_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fb7f04b68dddaa30793ceb1584fce53812c42a60..168a5e2aa627f932a23fa4aed2ca81418d2b7bd1 100644
--- a/chrome/browser/thumbnails/thumbnail_tab_helper.cc
+++ b/chrome/browser/thumbnails/thumbnail_tab_helper.cc
@@ -110,11 +110,7 @@ void ThumbnailTabHelper::NavigationStopped() {
void ThumbnailTabHelper::UpdateThumbnailIfNecessary() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- // Ignore thumbnail update requests if one is already in progress. This can
- // happen at the end of thumbnail generation when
- // CleanUpFromThumbnailGeneration() calls DecrementCapturerCount(), triggering
- // a call to content::WebContentsImpl::WasHidden() which eventually calls
- // ThumbnailTabHelper::UpdateThumbnailIfNecessary().
+ // Ignore thumbnail update requests if one is already in progress.
if (thumbnailing_context_) {
return;
}
@@ -141,10 +137,6 @@ void ThumbnailTabHelper::UpdateThumbnailIfNecessary() {
return;
}
- // Prevent the web contents from disappearing before the async thumbnail
- // generation code executes. See https://crbug.com/530707 .
- web_contents()->IncrementCapturerCount(gfx::Size());
-
AsyncProcessThumbnail(thumbnail_service);
}
@@ -216,12 +208,6 @@ void ThumbnailTabHelper::ProcessCapturedBitmap(
}
void ThumbnailTabHelper::CleanUpFromThumbnailGeneration() {
- if (web_contents()) {
- // Balance the call to IncrementCapturerCount() made in
- // UpdateThumbnailIfNecessary().
- web_contents()->DecrementCapturerCount();
- }
-
// Make a note that thumbnail generation is complete.
thumbnailing_context_ = nullptr;
}
« no previous file with comments | « no previous file | content/browser/renderer_host/browser_compositor_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698