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 // IPC messages for extensions. | 5 // IPC messages for extensions. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include "base/shared_memory.h" | 8 #include "base/shared_memory.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // Send creation flags so extension is initialized identically. | 121 // Send creation flags so extension is initialized identically. |
122 int creation_flags; | 122 int creation_flags; |
123 }; | 123 }; |
124 | 124 |
125 namespace IPC { | 125 namespace IPC { |
126 | 126 |
127 template <> | 127 template <> |
128 struct ParamTraits<URLPattern> { | 128 struct ParamTraits<URLPattern> { |
129 typedef URLPattern param_type; | 129 typedef URLPattern param_type; |
130 static void Write(Message* m, const param_type& p); | 130 static void Write(Message* m, const param_type& p); |
131 static bool Read(const Message* m, void** iter, param_type* p); | 131 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
132 static void Log(const param_type& p, std::string* l); | 132 static void Log(const param_type& p, std::string* l); |
133 }; | 133 }; |
134 | 134 |
135 template <> | 135 template <> |
136 struct ParamTraits<URLPatternSet> { | 136 struct ParamTraits<URLPatternSet> { |
137 typedef URLPatternSet param_type; | 137 typedef URLPatternSet param_type; |
138 static void Write(Message* m, const param_type& p); | 138 static void Write(Message* m, const param_type& p); |
139 static bool Read(const Message* m, void** iter, param_type* p); | 139 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
140 static void Log(const param_type& p, std::string* l); | 140 static void Log(const param_type& p, std::string* l); |
141 }; | 141 }; |
142 | 142 |
143 template <> | 143 template <> |
144 struct ParamTraits<ExtensionAPIPermission::ID> { | 144 struct ParamTraits<ExtensionAPIPermission::ID> { |
145 typedef ExtensionAPIPermission::ID param_type; | 145 typedef ExtensionAPIPermission::ID param_type; |
146 static void Write(Message* m, const param_type& p); | 146 static void Write(Message* m, const param_type& p); |
147 static bool Read(const Message* m, void** iter, param_type* p); | 147 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
148 static void Log(const param_type& p, std::string* l); | 148 static void Log(const param_type& p, std::string* l); |
149 }; | 149 }; |
150 | 150 |
151 template <> | 151 template <> |
152 struct ParamTraits<ExtensionMsg_Loaded_Params> { | 152 struct ParamTraits<ExtensionMsg_Loaded_Params> { |
153 typedef ExtensionMsg_Loaded_Params param_type; | 153 typedef ExtensionMsg_Loaded_Params param_type; |
154 static void Write(Message* m, const param_type& p); | 154 static void Write(Message* m, const param_type& p); |
155 static bool Read(const Message* m, void** iter, param_type* p); | 155 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
156 static void Log(const param_type& p, std::string* l); | 156 static void Log(const param_type& p, std::string* l); |
157 }; | 157 }; |
158 | 158 |
159 } // namespace IPC | 159 } // namespace IPC |
160 | 160 |
161 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_ | 161 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_ |
162 | 162 |
163 // Messages sent from the browser to the renderer. | 163 // Messages sent from the browser to the renderer. |
164 | 164 |
165 // The browser sends this message in response to all extension api calls. | 165 // The browser sends this message in response to all extension api calls. |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 // Response to the renderer for the above message. | 379 // Response to the renderer for the above message. |
380 IPC_MESSAGE_ROUTED3(ExtensionMsg_GetAppNotifyChannelResponse, | 380 IPC_MESSAGE_ROUTED3(ExtensionMsg_GetAppNotifyChannelResponse, |
381 std::string /* channel_id */, | 381 std::string /* channel_id */, |
382 std::string /* error */, | 382 std::string /* error */, |
383 int32 /* callback_id */) | 383 int32 /* callback_id */) |
384 | 384 |
385 // Deliver a message sent with ExtensionHostMsg_PostMessage. | 385 // Deliver a message sent with ExtensionHostMsg_PostMessage. |
386 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, | 386 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, |
387 int /* target_port_id */, | 387 int /* target_port_id */, |
388 std::string /* message */) | 388 std::string /* message */) |
OLD | NEW |