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

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

Issue 3834003: On Windows, create a new TransportDIB::Handle struct which includes the file (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Rebase Created 10 years, 2 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.cc
diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc
index 520faf46bd4197f6ef29d84d662b89853b7b805e..34ddf4286169e30d075d042551dd4316b2d79c5f 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.cc
+++ b/chrome/browser/tab_contents/thumbnail_generator.cc
@@ -11,6 +11,7 @@
#include "base/time.h"
#include "build/build_config.h"
#include "chrome/browser/renderer_host/backing_store.h"
+#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/notification_service.h"
@@ -208,7 +209,8 @@ void ThumbnailGenerator::AskForSnapshot(RenderWidgetHost* renderer,
}
renderer->PaintAtSize(
- thumbnail_dib->handle(), sequence_num, page_size, desired_size);
+ thumbnail_dib->GetHandleForProcess(renderer->process()->GetHandle()),
+ sequence_num, page_size, desired_size);
}
SkBitmap ThumbnailGenerator::GetThumbnailForRenderer(
@@ -299,7 +301,7 @@ void ThumbnailGenerator::WidgetDidReceivePaintAtSizeAck(
if (item != callback_map_.end()) {
TransportDIB* dib = item->second->thumbnail_dib.get();
DCHECK(dib);
- if (!dib) {
+ if (!dib || !dib->Map()) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698