Index: content/common/clipboard_messages.cc |
diff --git a/content/common/clipboard_messages.cc b/content/common/clipboard_messages.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..866a1c144765352e1536f5fe78dbbe35f35e9873 |
--- /dev/null |
+++ b/content/common/clipboard_messages.cc |
@@ -0,0 +1,30 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/common/clipboard_messages.h" |
+ |
+#include "ui/base/clipboard/clipboard.h" |
+ |
+namespace IPC { |
+ |
+void ParamTraits<ui::Clipboard::FormatType>::Write( |
+ Message* m, const param_type& p) { |
+ m->WriteString(p.Serialize()); |
+} |
+ |
+bool ParamTraits<ui::Clipboard::FormatType>::Read( |
+ const Message* m, void** iter, param_type* r) { |
+ std::string serialization; |
+ if (!ReadParam(m, iter, &serialization)) |
+ return false; |
+ *r = ui::Clipboard::FormatType::Deserialize(serialization); |
+ return true; |
+} |
+ |
+void ParamTraits<ui::Clipboard::FormatType>::Log( |
+ const param_type& p, std::string* l) { |
+ *l = p.Serialize(); |
+} |
+ |
+} // namespace IPC |