summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages_params.cc
diff options
context:
space:
mode:
authorkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 19:18:30 +0000
committerkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 19:18:30 +0000
commit36808add2cec1c95898ddf6037040a5637e6e846 (patch)
treec8234c82029df45fa62841644cc2b22cacc73fb5 /chrome/common/render_messages_params.cc
parent38e13cb3da9cec27ae90430f7f9d95986ce3d90f (diff)
downloadchromium_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/common/render_messages_params.cc')
-rw-r--r--chrome/common/render_messages_params.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/chrome/common/render_messages_params.cc b/chrome/common/render_messages_params.cc
index 73f5ea2..59802b4 100644
--- a/chrome/common/render_messages_params.cc
+++ b/chrome/common/render_messages_params.cc
@@ -38,11 +38,11 @@ ViewHostMsg_FrameNavigate_Params::~ViewHostMsg_FrameNavigate_Params() {
}
ViewHostMsg_UpdateRect_Params::ViewHostMsg_UpdateRect_Params()
- : dib_id(0),
- dib_handle(TransportDIB::DefaultHandleValue()),
- dx(0),
+ : dx(0),
dy(0),
flags(0) {
+ // On windows, bitmap is of type "struct HandleAndSequenceNum"
+ memset(&bitmap, 0, sizeof(bitmap));
}
ViewHostMsg_UpdateRect_Params::~ViewHostMsg_UpdateRect_Params() {
@@ -835,8 +835,7 @@ void ParamTraits<ViewHostMsg_FrameNavigate_Params>::Log(const param_type& p,
void ParamTraits<ViewHostMsg_UpdateRect_Params>::Write(
Message* m, const param_type& p) {
- WriteParam(m, p.dib_id);
- WriteParam(m, p.dib_handle);
+ WriteParam(m, p.bitmap);
WriteParam(m, p.bitmap_rect);
WriteParam(m, p.dx);
WriteParam(m, p.dy);
@@ -850,8 +849,7 @@ void ParamTraits<ViewHostMsg_UpdateRect_Params>::Write(
bool ParamTraits<ViewHostMsg_UpdateRect_Params>::Read(
const Message* m, void** iter, param_type* p) {
return
- ReadParam(m, iter, &p->dib_id) &&
- ReadParam(m, iter, &p->dib_handle) &&
+ ReadParam(m, iter, &p->bitmap) &&
ReadParam(m, iter, &p->bitmap_rect) &&
ReadParam(m, iter, &p->dx) &&
ReadParam(m, iter, &p->dy) &&
@@ -865,9 +863,7 @@ bool ParamTraits<ViewHostMsg_UpdateRect_Params>::Read(
void ParamTraits<ViewHostMsg_UpdateRect_Params>::Log(const param_type& p,
std::string* l) {
l->append("(");
- LogParam(p.dib_id, l);
- l->append(", ");
- LogParam(p.dib_handle, l);
+ LogParam(p.bitmap, l);
l->append(", ");
LogParam(p.bitmap_rect, l);
l->append(", ");