Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: content/common/clipboard_messages.cc

Issue 8801038: Make Clipboard::FormatType an opaque handle type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/clipboard_messages.h ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/common/clipboard_messages.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698