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

Unified Diff: mojo/spy/common.h

Issue 354043003: Add support for logging information about mojo messages retrieved by the mojo debugger (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review comments Created 6 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 | « mojo/mojo.gyp ('k') | mojo/spy/spy.cc » ('j') | mojo/spy/spy.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/spy/common.h
diff --git a/mojo/spy/common.h b/mojo/spy/common.h
new file mode 100644
index 0000000000000000000000000000000000000000..41b143bbe6f7de3391a56355c8f961b12f5ad009
--- /dev/null
+++ b/mojo/spy/common.h
@@ -0,0 +1,42 @@
+// Copyright 2014 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.
+
+#ifndef MOJO_SPY_COMMON_H_
+#define MOJO_SPY_COMMON_H_
+
+#include "base/basictypes.h"
viettrungluu 2014/06/30 19:16:54 You should probably only include <stdint.h> instea
ananta 2014/07/03 00:04:40 Done.
+
+namespace mojo {
+
+#pragma pack(push, 1)
+
viettrungluu 2014/06/30 19:16:54 nit: extra blank line
ananta 2014/07/03 00:04:40 Done.
+
+// Mojo message header structures. These are based off the Mojo spec.
+
+enum {
+ kMessageExpectsResponse = 1 << 0,
+ kMessageIsResponse = 1 << 1
+};
+
+struct MojoCommonHeader {
+ uint32_t num_bytes;
+ uint32_t num_fields;
+};
+
+struct MojoMessageHeader : public MojoCommonHeader {
+ uint32_t name;
+ uint32_t flags;
+ uint64_t request_id;
+};
+
+struct MojoMessageData {
+ MojoMessageHeader header;
+};
+
+#pragma pack(pop)
+
+} // namespace mojo
+
+#endif // MOJO_SPY_COMMON_H_
+
viettrungluu 2014/06/30 19:16:54 nit: extra blank line
ananta 2014/07/03 00:04:40 Done.
« no previous file with comments | « mojo/mojo.gyp ('k') | mojo/spy/spy.cc » ('j') | mojo/spy/spy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698