summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/Shared/UserMessageCoders.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/Shared/UserMessageCoders.h')
-rw-r--r--Source/WebKit2/Shared/UserMessageCoders.h41
1 files changed, 33 insertions, 8 deletions
diff --git a/Source/WebKit2/Shared/UserMessageCoders.h b/Source/WebKit2/Shared/UserMessageCoders.h
index 1326a98..ad72493 100644
--- a/Source/WebKit2/Shared/UserMessageCoders.h
+++ b/Source/WebKit2/Shared/UserMessageCoders.h
@@ -31,7 +31,9 @@
#include "ImmutableArray.h"
#include "ImmutableDictionary.h"
#include "ShareableBitmap.h"
+#include "WebCertificateInfo.h"
#include "WebCoreArgumentCoders.h"
+#include "WebData.h"
#include "WebImage.h"
#include "WebNumber.h"
#include "WebSerializedScriptValue.h"
@@ -47,6 +49,8 @@ namespace WebKit {
// - SerializedScriptValue -> SerializedScriptValue
// - String -> String
// - UserContentURLPattern -> UserContentURLPattern
+// - WebCertificateInfo -> WebCertificateInfo
+// - WebData -> WebData
// - WebDouble -> WebDouble
// - WebImage -> WebImage
// - WebUInt64 -> WebUInt64
@@ -128,16 +132,25 @@ public:
return true;
}
- SharedMemory::Handle handle;
+ ShareableBitmap::Handle handle;
if (!image->bitmap()->createHandle(handle))
return false;
encoder->encode(true);
- encoder->encode(image->size());
encoder->encode(handle);
return true;
}
+ case APIObject::TypeData: {
+ WebData* data = static_cast<WebData*>(m_root);
+ encoder->encodeBytes(data->bytes(), data->size());
+ return true;
+ }
+ case APIObject::TypeCertificateInfo: {
+ WebCertificateInfo* certificateInfo = static_cast<WebCertificateInfo*>(m_root);
+ encoder->encode(certificateInfo->platformCertificateInfo());
+ return true;
+ }
default:
break;
}
@@ -162,6 +175,8 @@ protected:
// - SerializedScriptValue -> SerializedScriptValue
// - String -> String
// - UserContentURLPattern -> UserContentURLPattern
+// - WebCertificateInfo -> WebCertificateInfo
+// - WebData -> WebData
// - WebDouble -> WebDouble
// - WebImage -> WebImage
// - WebUInt64 -> WebUInt64
@@ -277,17 +292,27 @@ public:
if (!didEncode)
break;
- WebCore::IntSize size;
- if (!decoder->decode(size))
- return false;
-
- SharedMemory::Handle handle;
+ ShareableBitmap::Handle handle;
if (!decoder->decode(handle))
return false;
- coder.m_root = WebImage::create(ShareableBitmap::create(size, handle));
+ coder.m_root = WebImage::create(ShareableBitmap::create(handle));
return true;
}
+ case APIObject::TypeData: {
+ Vector<uint8_t> buffer;
+ if (!decoder->decodeBytes(buffer))
+ return false;
+ coder.m_root = WebData::create(buffer);
+ break;
+ }
+ case APIObject::TypeCertificateInfo: {
+ PlatformCertificateInfo platformCertificateInfo;
+ if (!decoder->decode(platformCertificateInfo))
+ return false;
+ coder.m_root = WebCertificateInfo::create(platformCertificateInfo);
+ break;
+ }
default:
break;
}