| 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/draggable_region.h" | 10 #include "chrome/common/extensions/draggable_region.h" |
| 11 #include "chrome/common/extensions/extension.h" | 11 #include "chrome/common/extensions/extension.h" |
| 12 #include "chrome/common/extensions/permissions/permission_set.h" | 12 #include "chrome/common/extensions/permissions/permission_set.h" |
| 13 #include "chrome/common/extensions/permissions/socket_permission_data.h" |
| 13 #include "chrome/common/extensions/url_pattern.h" | 14 #include "chrome/common/extensions/url_pattern.h" |
| 14 #include "chrome/common/extensions/url_pattern_set.h" | 15 #include "chrome/common/extensions/url_pattern_set.h" |
| 15 #include "chrome/common/view_type.h" | 16 #include "chrome/common/view_type.h" |
| 16 #include "chrome/common/web_apps.h" | 17 #include "chrome/common/web_apps.h" |
| 17 #include "content/public/common/common_param_traits.h" | 18 #include "content/public/common/common_param_traits.h" |
| 18 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
| 19 #include "ipc/ipc_message_macros.h" | 20 #include "ipc/ipc_message_macros.h" |
| 20 | 21 |
| 21 #define IPC_MESSAGE_START ExtensionMsgStart | 22 #define IPC_MESSAGE_START ExtensionMsgStart |
| 22 | 23 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 163 |
| 163 template <> | 164 template <> |
| 164 struct ParamTraits<extensions::APIPermission::ID> { | 165 struct ParamTraits<extensions::APIPermission::ID> { |
| 165 typedef extensions::APIPermission::ID param_type; | 166 typedef extensions::APIPermission::ID param_type; |
| 166 static void Write(Message* m, const param_type& p); | 167 static void Write(Message* m, const param_type& p); |
| 167 static bool Read(const Message* m, PickleIterator* iter, param_type* p); | 168 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 168 static void Log(const param_type& p, std::string* l); | 169 static void Log(const param_type& p, std::string* l); |
| 169 }; | 170 }; |
| 170 | 171 |
| 171 template <> | 172 template <> |
| 173 struct ParamTraits<scoped_refptr<extensions::APIPermissionDetail> > { |
| 174 typedef scoped_refptr<extensions::APIPermissionDetail> 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::APIPermissionSet> { |
| 182 typedef extensions::APIPermissionSet 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 <> |
| 189 struct ParamTraits<extensions::SocketPermissionData> { |
| 190 typedef extensions::SocketPermissionData param_type; |
| 191 static void Write(Message* m, const param_type& p); |
| 192 static bool Read(const Message* m, PickleIterator* iter, param_type* r); |
| 193 static void Log(const param_type& p, std::string* l); |
| 194 }; |
| 195 |
| 196 template <> |
| 172 struct ParamTraits<ExtensionMsg_Loaded_Params> { | 197 struct ParamTraits<ExtensionMsg_Loaded_Params> { |
| 173 typedef ExtensionMsg_Loaded_Params param_type; | 198 typedef ExtensionMsg_Loaded_Params param_type; |
| 174 static void Write(Message* m, const param_type& p); | 199 static void Write(Message* m, const param_type& p); |
| 175 static bool Read(const Message* m, PickleIterator* iter, param_type* p); | 200 static bool Read(const Message* m, PickleIterator* iter, param_type* p); |
| 176 static void Log(const param_type& p, std::string* l); | 201 static void Log(const param_type& p, std::string* l); |
| 177 }; | 202 }; |
| 178 | 203 |
| 179 } // namespace IPC | 204 } // namespace IPC |
| 180 | 205 |
| 181 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_ | 206 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_ |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 // browser process. | 534 // browser process. |
| 510 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID, | 535 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID, |
| 511 int /* unique_id */) | 536 int /* unique_id */) |
| 512 | 537 |
| 513 // Resumes resource requests for a newly created app window. | 538 // Resumes resource requests for a newly created app window. |
| 514 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_ResumeRequests, int /* route_id */) | 539 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_ResumeRequests, int /* route_id */) |
| 515 | 540 |
| 516 // Sent by the renderer when the draggable regions are updated. | 541 // Sent by the renderer when the draggable regions are updated. |
| 517 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_UpdateDraggableRegions, | 542 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_UpdateDraggableRegions, |
| 518 std::vector<extensions::DraggableRegion> /* regions */) | 543 std::vector<extensions::DraggableRegion> /* regions */) |
| OLD | NEW |