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

Side by Side Diff: ipc/ipc_message_utils.h

Issue 6410007: Make the implementation .cc files go away, instead have the authors give us a... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef IPC_IPC_MESSAGE_UTILS_H_ 5 #ifndef IPC_IPC_MESSAGE_UTILS_H_
6 #define IPC_IPC_MESSAGE_UTILS_H_ 6 #define IPC_IPC_MESSAGE_UTILS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 if (!msg_.ReadData(&iter_, data, length)) { 114 if (!msg_.ReadData(&iter_, data, length)) {
115 NOTREACHED(); 115 NOTREACHED();
116 } 116 }
117 } 117 }
118 private: 118 private:
119 const Message& msg_; 119 const Message& msg_;
120 mutable void* iter_; 120 mutable void* iter_;
121 }; 121 };
122 122
123 //----------------------------------------------------------------------------- 123 //-----------------------------------------------------------------------------
124 // A dummy struct to place first just to allow leading commas for all
jam 2011/02/07 20:17:01 this isn't needed anymore right?
125 // members in the macro-generated constructor initializer lists.
126 struct NoParams {
127 };
128
129 //-----------------------------------------------------------------------------
124 // ParamTraits specializations, etc. 130 // ParamTraits specializations, etc.
125 131
126 template <class P> 132 template <class P>
127 static inline void WriteParam(Message* m, const P& p) { 133 static inline void WriteParam(Message* m, const P& p) {
128 typedef typename SimilarTypeTraits<P>::Type Type; 134 typedef typename SimilarTypeTraits<P>::Type Type;
129 ParamTraits<Type>::Write(m, static_cast<const Type& >(p)); 135 ParamTraits<Type>::Write(m, static_cast<const Type& >(p));
130 } 136 }
131 137
132 template <class P> 138 template <class P>
133 static inline bool WARN_UNUSED_RESULT ReadParam(const Message* m, void** iter, 139 static inline bool WARN_UNUSED_RESULT ReadParam(const Message* m, void** iter,
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 ReplyParam p(a, b, c, d, e); 1194 ReplyParam p(a, b, c, d, e);
1189 WriteParam(reply, p); 1195 WriteParam(reply, p);
1190 } 1196 }
1191 }; 1197 };
1192 1198
1193 //----------------------------------------------------------------------------- 1199 //-----------------------------------------------------------------------------
1194 1200
1195 } // namespace IPC 1201 } // namespace IPC
1196 1202
1197 #endif // IPC_IPC_MESSAGE_UTILS_H_ 1203 #endif // IPC_IPC_MESSAGE_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698