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

Unified Diff: chrome/browser/gtk/tabs/dragged_tab_gtk.cc

Issue 144006: Add Linux support for getting the thumbnail and wire into the switcher. (Closed)
Patch Set: For checkin Created 11 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 | chrome/browser/renderer_host/backing_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/tabs/dragged_tab_gtk.cc
diff --git a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
index b91cf7bd4f729be7537ee7766c9a4823b9670b21..9a25ca97529e68aa8e554dc5bd0d513343e9ae08 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
+++ b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc
@@ -287,11 +287,9 @@ void DraggedTabGtk::PaintScreenshotIntoCanvas(gfx::Canvas* canvas,
const gfx::Rect& target_bounds) {
gfx::Rect rect(0, 0,
contents_->allocation.width, contents_->allocation.height);
- SkBitmap* bitmap = backing_store_->PaintRectToBitmap(rect);
- if (bitmap) {
- canvas->DrawBitmapInt(*bitmap, 0, renderer_->bounds().height());
- delete bitmap;
- }
+ SkBitmap bitmap = backing_store_->PaintRectToBitmap(rect);
+ if (!bitmap.isNull())
+ canvas->DrawBitmapInt(bitmap, 0, renderer_->bounds().height());
}
// static
« no previous file with comments | « no previous file | chrome/browser/renderer_host/backing_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698