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

Side by Side Diff: ipc/ipc_message_macros.h

Issue 1655333002: Add message sizing to basic IPC traits and struct macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@with-pickles
Patch Set: include ArrayHeader in size (oops!) and ensure the buffer doesn't relocate Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « base/pickle_unittest.cc ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Defining IPC Messages 5 // Defining IPC Messages
6 // 6 //
7 // Your IPC messages will be defined by macros inside of an XXX_messages.h 7 // Your IPC messages will be defined by macros inside of an XXX_messages.h
8 // header file. Most of the time, the system can automatically generate all 8 // header file. Most of the time, the system can automatically generate all
9 // of messaging mechanism from these definitions, but sometimes some manual 9 // of messaging mechanism from these definitions, but sometimes some manual
10 // coding is required. In these cases, you will also have an XXX_messages.cc 10 // coding is required. In these cases, you will also have an XXX_messages.cc
(...skipping 27 matching lines...) Expand all
38 // the following code: 38 // the following code:
39 // // Get basic type definitions. 39 // // Get basic type definitions.
40 // #define IPC_MESSAGE_IMPL 40 // #define IPC_MESSAGE_IMPL
41 // #include "path/to/YYY_message_generator.h" 41 // #include "path/to/YYY_message_generator.h"
42 // // Generate constructors. 42 // // Generate constructors.
43 // #include "ipc/struct_constructor_macros.h" 43 // #include "ipc/struct_constructor_macros.h"
44 // #include "path/to/YYY_message_generator.h" 44 // #include "path/to/YYY_message_generator.h"
45 // // Generate destructors. 45 // // Generate destructors.
46 // #include "ipc/struct_destructor_macros.h" 46 // #include "ipc/struct_destructor_macros.h"
47 // #include "path/to/YYY_message_generator.h" 47 // #include "path/to/YYY_message_generator.h"
48 // // Generate param traits size methods.
49 // #include "ipc/param_traits_size_macros.h"
50 // namespace IPC {
51 // #include "path/to/YYY_message_generator.h"
52 // } // namespace IPC
48 // // Generate param traits write methods. 53 // // Generate param traits write methods.
49 // #include "ipc/param_traits_write_macros.h" 54 // #include "ipc/param_traits_write_macros.h"
50 // namespace IPC { 55 // namespace IPC {
51 // #include "path/to/YYY_message_generator.h" 56 // #include "path/to/YYY_message_generator.h"
52 // } // namespace IPC 57 // } // namespace IPC
53 // // Generate param traits read methods. 58 // // Generate param traits read methods.
54 // #include "ipc/param_traits_read_macros.h" 59 // #include "ipc/param_traits_read_macros.h"
55 // namespace IPC { 60 // namespace IPC {
56 // #include "path/to/YYY_message_generator.h" 61 // #include "path/to/YYY_message_generator.h"
57 // } // namespace IPC 62 // } // namespace IPC
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 // This corresponds to an enum value from IPCMessageStart. 980 // This corresponds to an enum value from IPCMessageStart.
976 #define IPC_MESSAGE_CLASS(message) \ 981 #define IPC_MESSAGE_CLASS(message) \
977 IPC_MESSAGE_ID_CLASS(message.type()) 982 IPC_MESSAGE_ID_CLASS(message.type())
978 983
979 #endif // IPC_IPC_MESSAGE_MACROS_H_ 984 #endif // IPC_IPC_MESSAGE_MACROS_H_
980 985
981 // Clean up IPC_MESSAGE_START in this unguarded section so that the 986 // Clean up IPC_MESSAGE_START in this unguarded section so that the
982 // XXX_messages.h files need not do so themselves. This makes the 987 // XXX_messages.h files need not do so themselves. This makes the
983 // XXX_messages.h files easier to write. 988 // XXX_messages.h files easier to write.
984 #undef IPC_MESSAGE_START 989 #undef IPC_MESSAGE_START
OLDNEW
« no previous file with comments | « base/pickle_unittest.cc ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698