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

Unified Diff: chrome/common/ipc_message_utils.h

Issue 146009: linux plugins: eliminate GtkWidget* from plugin process (Closed)
Patch Set: retry Created 11 years, 6 months 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 | « base/gfx/native_widget_types.h ('k') | chrome/plugin/webplugin_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/ipc_message_utils.h
diff --git a/chrome/common/ipc_message_utils.h b/chrome/common/ipc_message_utils.h
index 2ae2ab5cdbd4b244250f3720befd71cc9585c063..f777d06c8728a09c97ce904deffc9496650f9394 100644
--- a/chrome/common/ipc_message_utils.h
+++ b/chrome/common/ipc_message_utils.h
@@ -176,6 +176,27 @@ struct ParamTraits<long> {
}
};
+#if defined(OS_LINUX)
+// unsigned long is used for serializing X window ids.
+template <>
+struct ParamTraits<unsigned long> {
+ typedef unsigned long param_type;
+ static void Write(Message* m, const param_type& p) {
+ m->WriteLong(p);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ long read_output;
+ if (!m->ReadLong(iter, &read_output))
+ return false;
+ *r = static_cast<unsigned long>(read_output);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(StringPrintf(L"%ul", p));
+ }
+};
+#endif
+
template <>
struct ParamTraits<size_t> {
typedef size_t param_type;
« no previous file with comments | « base/gfx/native_widget_types.h ('k') | chrome/plugin/webplugin_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698