| OLD | NEW |
| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // acceptable when your XXX_messages.h header is being included by the | 106 // acceptable when your XXX_messages.h header is being included by the |
| 107 // message sending caller's code, but not when the YYY_message_generator.c | 107 // message sending caller's code, but not when the YYY_message_generator.c |
| 108 // is building the messages. In addtion, due to the multiple inclusion | 108 // is building the messages. In addtion, due to the multiple inclusion |
| 109 // restriction, these type ought to be guarded. Follow a convention like: | 109 // restriction, these type ought to be guarded. Follow a convention like: |
| 110 // #ifndef SOME_GUARD_MACRO | 110 // #ifndef SOME_GUARD_MACRO |
| 111 // #define SOME_GUARD_MACRO | 111 // #define SOME_GUARD_MACRO |
| 112 // class some_class; // One incomplete class declaration | 112 // class some_class; // One incomplete class declaration |
| 113 // class_some_other_class; // Another incomplete class declaration | 113 // class_some_other_class; // Another incomplete class declaration |
| 114 // #endif // SOME_GUARD_MACRO | 114 // #endif // SOME_GUARD_MACRO |
| 115 // #ifdef IPC_MESSAGE_IMPL | 115 // #ifdef IPC_MESSAGE_IMPL |
| 116 // #inlcude "path/to/some_class.h" // Full class declaration | 116 // #include "path/to/some_class.h" // Full class declaration |
| 117 // #inlcude "path/to/some_other_class.h" // Full class declaration | 117 // #include "path/to/some_other_class.h" // Full class declaration |
| 118 // #endif // IPC_MESSAGE_IMPL | 118 // #endif // IPC_MESSAGE_IMPL |
| 119 // (.. IPC macros using some_class and some_other_class ...) | 119 // (.. IPC macros using some_class and some_other_class ...) |
| 120 // | 120 // |
| 121 // Macro Invocations | 121 // Macro Invocations |
| 122 // | 122 // |
| 123 // You will use IPC message macro invocations for three things: | 123 // You will use IPC message macro invocations for three things: |
| 124 // - New struct definitions for IPC | 124 // - New struct definitions for IPC |
| 125 // - Registering existing struct and enum definitions with IPC | 125 // - Registering existing struct and enum definitions with IPC |
| 126 // - Defining the messages themselves | 126 // - Defining the messages themselves |
| 127 // | 127 // |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 // equivalent without the #ifdef, VS2013 contains a bug where it is | 978 // equivalent without the #ifdef, VS2013 contains a bug where it is |
| 979 // over-aggressive in optimizing out #includes. Putting the #ifdef is a | 979 // over-aggressive in optimizing out #includes. Putting the #ifdef is a |
| 980 // workaround for this bug. See http://goo.gl/eGt2Fb for more details. | 980 // workaround for this bug. See http://goo.gl/eGt2Fb for more details. |
| 981 // This can be removed once VS2013 is fixed. | 981 // This can be removed once VS2013 is fixed. |
| 982 #ifdef IPC_MESSAGE_START | 982 #ifdef IPC_MESSAGE_START |
| 983 // Clean up IPC_MESSAGE_START in this unguarded section so that the | 983 // Clean up IPC_MESSAGE_START in this unguarded section so that the |
| 984 // XXX_messages.h files need not do so themselves. This makes the | 984 // XXX_messages.h files need not do so themselves. This makes the |
| 985 // XXX_messages.h files easier to write. | 985 // XXX_messages.h files easier to write. |
| 986 #undef IPC_MESSAGE_START | 986 #undef IPC_MESSAGE_START |
| 987 #endif | 987 #endif |
| OLD | NEW |