diff options
author | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 18:00:36 +0000 |
---|---|---|
committer | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 18:00:36 +0000 |
commit | ae849ea693102dd66d5f01d9ad6799e0bde070d0 (patch) | |
tree | 2fdafb8dd84f96c9e61a6b5831860e4ba8406aba /chrome/browser/renderer_host/render_widget_host.h | |
parent | d62b5fc77d374524bed3752950f268851b8585c6 (diff) | |
download | chromium_src-ae849ea693102dd66d5f01d9ad6799e0bde070d0.zip chromium_src-ae849ea693102dd66d5f01d9ad6799e0bde070d0.tar.gz chromium_src-ae849ea693102dd66d5f01d9ad6799e0bde070d0.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63232 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_widget_host.h')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h index 6c3fed7..26d1c2c 100644 --- a/chrome/browser/renderer_host/render_widget_host.h +++ b/chrome/browser/renderer_host/render_widget_host.h @@ -480,7 +480,9 @@ class RenderWidgetHost : public IPC::Channel::Listener, void OnMsgPaintAtSizeAck(int tag, const gfx::Size& size); void OnMsgUpdateRect(const ViewHostMsg_UpdateRect_Params& params); void OnMsgCreateVideo(const gfx::Size& size); - void OnMsgUpdateVideo(TransportDIB::Id bitmap, const gfx::Rect& bitmap_rect); + void OnMsgUpdateVideo(TransportDIB::Id dib_id, + TransportDIB::Handle dib_handle, + const gfx::Rect& bitmap_rect); void OnMsgDestroyVideo(); void OnMsgInputEventAck(const IPC::Message& message); virtual void OnMsgFocus(); @@ -523,7 +525,8 @@ class RenderWidgetHost : public IPC::Channel::Listener, // synchronously, and the bitmap is done being used. False means that the // backing store will paint the bitmap at a later time and that the DIB can't // be freed (it will be the backing store's job to free it later). - void PaintBackingStoreRect(TransportDIB::Id bitmap, + void PaintBackingStoreRect(TransportDIB::Id dib_id, + TransportDIB::Handle dib_handle, const gfx::Rect& bitmap_rect, const std::vector<gfx::Rect>& copy_rects, const gfx::Size& view_size, @@ -538,7 +541,8 @@ class RenderWidgetHost : public IPC::Channel::Listener, // Paints the entire given bitmap into the current video layer, if it exists. // |bitmap_rect| specifies the destination size and absolute location of the // bitmap on the backing store. - void PaintVideoLayer(TransportDIB::Id bitmap, + void PaintVideoLayer(TransportDIB::Id dib_id, + TransportDIB::Handle dib_handle, const gfx::Rect& bitmap_rect); // Called by OnMsgInputEventAck() to process a keyboard event ack message. |