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

Unified Diff: ipc/ipc_message_utils.h

Issue 17265006: wayland patch for inspection Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « gpu/gpu_config.gypi ('k') | third_party/khronos/EGL/eglplatform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils.h
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index 7fda943f355a882533c2f8916d4ba8ce64d4186b..13301871d8897210e08a49eb364d8fb4da2b8d9b 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -686,6 +686,34 @@ struct IPC_EXPORT ParamTraits<Message> {
static void Log(const Message& p, std::string* l);
};
+// Wayland ParamTraits ---------------------------------------------------------
+
+#if defined(USE_WAYLAND)
+template <>
+struct IPC_EXPORT ParamTraits<ui::WaylandWindow*> {
+ typedef ui::WaylandWindow* param_type;
+ static void Write(Message* m, const param_type& p) {
+ m->WriteData(reinterpret_cast<const char*>(&p), sizeof(ui::WaylandWindow*));
+ }
+ static bool Read(const Message* m, PickleIterator* iter, param_type* r) {
+ const char *data;
+ int data_size = 0;
+ bool result = m->ReadData(iter, &data, &data_size);
+ if (result && data_size == sizeof(ui::WaylandWindow*)) {
+ memcpy(r, data, sizeof(ui::WaylandWindow*));
+ } else {
+ result = false;
+ NOTREACHED();
+ }
+
+ return result;
+ }
+ static void Log(const param_type& p, std::string* l) {
+ l->append("<ui::WaylandWindow*>");
+ }
+};
+#endif
+
// Windows ParamTraits ---------------------------------------------------------
#if defined(OS_WIN)
« no previous file with comments | « gpu/gpu_config.gypi ('k') | third_party/khronos/EGL/eglplatform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698