| 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" |
| 11 #include "chrome/common/extensions/permissions/permission_set.h" | 11 #include "chrome/common/extensions/permissions/permission_set.h" |
| 12 #include "chrome/common/extensions/permissions/socket_permission_data.h" |
| 12 #include "chrome/common/extensions/url_pattern.h" | 13 #include "chrome/common/extensions/url_pattern.h" |
| 13 #include "chrome/common/extensions/url_pattern_set.h" | 14 #include "chrome/common/extensions/url_pattern_set.h" |
| 14 #include "chrome/common/view_type.h" | 15 #include "chrome/common/view_type.h" |
| 15 #include "chrome/common/web_apps.h" | 16 #include "chrome/common/web_apps.h" |
| 16 #include "content/public/common/common_param_traits.h" | 17 #include "content/public/common/common_param_traits.h" |
| 17 #include "ipc/ipc_message_macros.h" | 18 #include "ipc/ipc_message_macros.h" |
| 18 | 19 |
| 19 #define IPC_MESSAGE_START ExtensionMsgStart | 20 #define IPC_MESSAGE_START ExtensionMsgStart |
| 20 | 21 |
| 21 IPC_ENUM_TRAITS(chrome::ViewType) | 22 IPC_ENUM_TRAITS(chrome::ViewType) |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 155 |
| 155 template <> | 156 template <> |
| 156 struct ParamTraits<extensions::APIPermission::ID> { | 157 struct ParamTraits<extensions::APIPermission::ID> { |
| 157 typedef extensions::APIPermission::ID param_type; | 158 typedef extensions::APIPermission::ID param_type; |
| 158 static void Write(Message* m, const param_type& p); | 159 static void Write(Message* m, const param_type& p); |
| 159 static bool Read(const Message* m, PickleIterator* iter, param_type* p); | 160 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 160 static void Log(const param_type& p, std::string* l); | 161 static void Log(const param_type& p, std::string* l); |
| 161 }; | 162 }; |
| 162 | 163 |
| 163 template <> | 164 template <> |
| 165 struct ParamTraits<scoped_refptr<extensions::APIPermissionDetail> > { |
| 166 typedef scoped_refptr<extensions::APIPermissionDetail> param_type; |
| 167 static void Write(Message* m, const param_type& p); |
| 168 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 169 static void Log(const param_type& p, std::string* l); |
| 170 }; |
| 171 |
| 172 template <> |
| 173 struct ParamTraits<extensions::APIPermissionSet> { |
| 174 typedef extensions::APIPermissionSet param_type; |
| 175 static void Write(Message* m, const param_type& p); |
| 176 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 177 static void Log(const param_type& p, std::string* l); |
| 178 }; |
| 179 |
| 180 template <> |
| 181 struct ParamTraits<extensions::SocketPermissionData> { |
| 182 typedef extensions::SocketPermissionData param_type; |
| 183 static void Write(Message* m, const param_type& p); |
| 184 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 185 static void Log(const param_type& p, std::string* l); |
| 186 }; |
| 187 |
| 188 template <> |
| 164 struct ParamTraits<ExtensionMsg_Loaded_Params> { | 189 struct ParamTraits<ExtensionMsg_Loaded_Params> { |
| 165 typedef ExtensionMsg_Loaded_Params param_type; | 190 typedef ExtensionMsg_Loaded_Params param_type; |
| 166 static void Write(Message* m, const param_type& p); | 191 static void Write(Message* m, const param_type& p); |
| 167 static bool Read(const Message* m, PickleIterator* iter, param_type* p); | 192 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 168 static void Log(const param_type& p, std::string* l); | 193 static void Log(const param_type& p, std::string* l); |
| 169 }; | 194 }; |
| 170 | 195 |
| 171 } // namespace IPC | 196 } // namespace IPC |
| 172 | 197 |
| 173 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_ | 198 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_ |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 // alive. | 521 // alive. |
| 497 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_DecrementLazyKeepaliveCount) | 522 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_DecrementLazyKeepaliveCount) |
| 498 | 523 |
| 499 // Fetches a globally unique ID (for the lifetime of the browser) from the | 524 // Fetches a globally unique ID (for the lifetime of the browser) from the |
| 500 // browser process. | 525 // browser process. |
| 501 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID, | 526 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID, |
| 502 int /* unique_id */) | 527 int /* unique_id */) |
| 503 | 528 |
| 504 // Resumes resource requests for a newly created app window. | 529 // Resumes resource requests for a newly created app window. |
| 505 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_ResumeRequests, int /* route_id */) | 530 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_ResumeRequests, int /* route_id */) |
| OLD | NEW |