diff options
author | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 19:18:30 +0000 |
---|---|---|
committer | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 19:18:30 +0000 |
commit | 36808add2cec1c95898ddf6037040a5637e6e846 (patch) | |
tree | c8234c82029df45fa62841644cc2b22cacc73fb5 /chrome/browser/tab_contents | |
parent | 38e13cb3da9cec27ae90430f7f9d95986ce3d90f (diff) | |
download | chromium_src-36808add2cec1c95898ddf6037040a5637e6e846.zip chromium_src-36808add2cec1c95898ddf6037040a5637e6e846.tar.gz chromium_src-36808add2cec1c95898ddf6037040a5637e6e846.tar.bz2 |
Revert 63232 - On Windows, create a new TransportDIB::Handle struct which includes the file
mapping HANDLE and the source process ID. Duplicating the handle for the
remote process is done in TransportDIB::Map, instead of in various #ifdefs
scattered across the code. Also on windows, remove the struct for the
TransportDIB::Id which contained both the sequence number and the HANDLE and
replace it with just the sequence number.
Fix ThumbnailGenerator by mapping the TransportDIB on Windows and adding
a method to duplicate the file mapping handle before sending across the
channel.
Also, add a ScopedHandle and fix some handle leaks.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3834003
TBR=kkania@chromium.org
Review URL: http://codereview.chromium.org/3943002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63246 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/thumbnail_generator.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc index 34ddf42..520faf4 100644 --- a/chrome/browser/tab_contents/thumbnail_generator.cc +++ b/chrome/browser/tab_contents/thumbnail_generator.cc @@ -11,7 +11,6 @@ #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" @@ -209,8 +208,7 @@ void ThumbnailGenerator::AskForSnapshot(RenderWidgetHost* renderer, } renderer->PaintAtSize( - thumbnail_dib->GetHandleForProcess(renderer->process()->GetHandle()), - sequence_num, page_size, desired_size); + thumbnail_dib->handle(), sequence_num, page_size, desired_size); } SkBitmap ThumbnailGenerator::GetThumbnailForRenderer( @@ -301,7 +299,7 @@ void ThumbnailGenerator::WidgetDidReceivePaintAtSizeAck( if (item != callback_map_.end()) { TransportDIB* dib = item->second->thumbnail_dib.get(); DCHECK(dib); - if (!dib || !dib->Map()) { + if (!dib) { return; } |