summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_message_utils.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 16:25:01 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 16:25:01 +0000
commit43a4020cd2aa067b10c55731978d9ac127a4cd50 (patch)
treee1fbf216dbd797608aa0eb7134b4e09700b50165 /ipc/ipc_message_utils.cc
parent2140bd517307f12157235ff301c55ad84607c21a (diff)
downloadchromium_src-43a4020cd2aa067b10c55731978d9ac127a4cd50.zip
chromium_src-43a4020cd2aa067b10c55731978d9ac127a4cd50.tar.gz
chromium_src-43a4020cd2aa067b10c55731978d9ac127a4cd50.tar.bz2
Add proxies for some of the PDF & Flash functionality. There are still a few
unimplemented parts in the Flash proxy, and I only implemented the necessary part of the PDF one. TEST=none BUG=none Review URL: http://codereview.chromium.org/4752008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_message_utils.cc')
-rw-r--r--ipc/ipc_message_utils.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index cc10cc2..f25d4f9 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -233,6 +233,23 @@ void ParamTraits<unsigned long long>::Log(const param_type& p, std::string* l) {
l->append(base::Uint64ToString(p));
}
+void ParamTraits<unsigned short>::Write(Message* m, const param_type& p) {
+ m->WriteBytes(&p, sizeof(param_type));
+}
+
+bool ParamTraits<unsigned short>::Read(const Message* m, void** iter,
+ param_type* r) {
+ const char* data;
+ if (!m->ReadBytes(iter, &data, sizeof(param_type)))
+ return false;
+ memcpy(r, data, sizeof(param_type));
+ return true;
+}
+
+void ParamTraits<unsigned short>::Log(const param_type& p, std::string* l) {
+ l->append(base::UintToString(p));
+}
+
void ParamTraits<base::Time>::Write(Message* m, const param_type& p) {
ParamTraits<int64>::Write(m, p.ToInternalValue());
}