summaryrefslogtreecommitdiffstats
path: root/printing/emf_win.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-16 23:58:27 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-16 23:58:27 +0000
commitb5ab398db97d13c76d332c6567c23a575858f8c4 (patch)
tree54a5771b49afbb92470d92b82bcac1a78d10f2f8 /printing/emf_win.cc
parent77bd2cefb7f0f8f437b47b3d6a3dd458b8d4fe2e (diff)
downloadchromium_src-b5ab398db97d13c76d332c6567c23a575858f8c4.zip
chromium_src-b5ab398db97d13c76d332c6567c23a575858f8c4.tar.gz
chromium_src-b5ab398db97d13c76d332c6567c23a575858f8c4.tar.bz2
Make SharedMemory use uint32 instead of size_t. This removes the remaining size_t's from the IPC code.
Review URL: http://codereview.chromium.org/581001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39164 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing/emf_win.cc')
-rw-r--r--printing/emf_win.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/printing/emf_win.cc b/printing/emf_win.cc
index 42380443..f69d4fa 100644
--- a/printing/emf_win.cc
+++ b/printing/emf_win.cc
@@ -24,10 +24,9 @@ bool Emf::CreateDc(HDC sibling, const RECT* rect) {
return hdc_ != NULL;
}
-bool Emf::CreateFromData(const void* buffer, size_t size) {
+bool Emf::CreateFromData(const void* buffer, uint32 size) {
DCHECK(!emf_ && !hdc_);
- emf_ = SetEnhMetaFileBits(static_cast<unsigned>(size),
- reinterpret_cast<const BYTE*>(buffer));
+ emf_ = SetEnhMetaFileBits(size, reinterpret_cast<const BYTE*>(buffer));
DCHECK(emf_);
return emf_ != NULL;
}
@@ -96,22 +95,22 @@ gfx::Rect Emf::GetBounds() const {
header.rclBounds.bottom - header.rclBounds.top);
}
-unsigned Emf::GetDataSize() const {
+uint32 Emf::GetDataSize() const {
DCHECK(emf_ && !hdc_);
return GetEnhMetaFileBits(emf_, 0, NULL);
}
-bool Emf::GetData(void* buffer, size_t size) const {
+bool Emf::GetData(void* buffer, uint32 size) const {
DCHECK(emf_ && !hdc_);
DCHECK(buffer && size);
- unsigned size2 = GetEnhMetaFileBits(emf_, static_cast<unsigned>(size),
- reinterpret_cast<BYTE*>(buffer));
+ uint32 size2 =
+ GetEnhMetaFileBits(emf_, size, reinterpret_cast<BYTE*>(buffer));
DCHECK(size2 == size);
return size2 == size && size2 != 0;
}
bool Emf::GetData(std::vector<uint8>* buffer) const {
- unsigned size = GetDataSize();
+ uint32 size = GetDataSize();
if (!size)
return false;