OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 explicit ExtensionMsg_Loaded_Params(const Extension* extension); | 92 explicit ExtensionMsg_Loaded_Params(const Extension* extension); |
93 | 93 |
94 // A copy constructor is needed because this structure can end up getting | 94 // A copy constructor is needed because this structure can end up getting |
95 // copied inside the IPC machinery on gcc <= 4.2. | 95 // copied inside the IPC machinery on gcc <= 4.2. |
96 ExtensionMsg_Loaded_Params(const ExtensionMsg_Loaded_Params& other); | 96 ExtensionMsg_Loaded_Params(const ExtensionMsg_Loaded_Params& other); |
97 | 97 |
98 // Creates a new extension from the data in this object. | 98 // Creates a new extension from the data in this object. |
99 scoped_refptr<Extension> ConvertToExtension() const; | 99 scoped_refptr<Extension> ConvertToExtension() const; |
100 | 100 |
101 // The subset of the extension manifest data we send to renderers. | 101 // The subset of the extension manifest data we send to renderers. |
102 scoped_ptr<DictionaryValue> manifest; | 102 linked_ptr<DictionaryValue> manifest; |
103 | 103 |
104 // The location the extension was installed from. | 104 // The location the extension was installed from. |
105 Extension::Location location; | 105 Extension::Location location; |
106 | 106 |
107 // The path the extension was loaded from. This is used in the renderer only | 107 // The path the extension was loaded from. This is used in the renderer only |
108 // to generate the extension ID for extensions that are loaded unpacked. | 108 // to generate the extension ID for extensions that are loaded unpacked. |
109 FilePath path; | 109 FilePath path; |
110 | 110 |
111 // The extension's current active permissions. | 111 // The extension's current active permissions. |
112 ExtensionAPIPermissionSet apis; | 112 ExtensionAPIPermissionSet apis; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // Marks an extension as 'active' in an extension process. 'Active' extensions | 187 // Marks an extension as 'active' in an extension process. 'Active' extensions |
188 // have more privileges than other extension content that might end up running | 188 // have more privileges than other extension content that might end up running |
189 // in the process (e.g. because of iframes or content scripts). | 189 // in the process (e.g. because of iframes or content scripts). |
190 IPC_MESSAGE_CONTROL1(ExtensionMsg_ActivateExtension, | 190 IPC_MESSAGE_CONTROL1(ExtensionMsg_ActivateExtension, |
191 std::string /* extension_id */) | 191 std::string /* extension_id */) |
192 | 192 |
193 // Marks an application as 'active' in a process. | 193 // Marks an application as 'active' in a process. |
194 IPC_MESSAGE_CONTROL1(ExtensionMsg_ActivateApplication, | 194 IPC_MESSAGE_CONTROL1(ExtensionMsg_ActivateApplication, |
195 std::string /* extension_id */) | 195 std::string /* extension_id */) |
196 | 196 |
197 // Notifies the renderer that an extension was loaded in the browser. | 197 // Notifies the renderer that extensions were loaded in the browser. |
198 IPC_MESSAGE_CONTROL1(ExtensionMsg_Loaded, | 198 IPC_MESSAGE_CONTROL1(ExtensionMsg_Loaded, |
199 ExtensionMsg_Loaded_Params) | 199 std::vector<ExtensionMsg_Loaded_Params>) |
200 | 200 |
201 // Notifies the renderer that an extension was unloaded in the browser. | 201 // Notifies the renderer that an extension was unloaded in the browser. |
202 IPC_MESSAGE_CONTROL1(ExtensionMsg_Unloaded, | 202 IPC_MESSAGE_CONTROL1(ExtensionMsg_Unloaded, |
203 std::string) | 203 std::string) |
204 | 204 |
205 // Updates the scripting whitelist for extensions in the render process. This is | 205 // Updates the scripting whitelist for extensions in the render process. This is |
206 // only used for testing. | 206 // only used for testing. |
207 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetScriptingWhitelist, | 207 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetScriptingWhitelist, |
208 Extension::ScriptingWhitelist /* extenison ids */) | 208 Extension::ScriptingWhitelist /* extenison ids */) |
209 | 209 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 // Response to the renderer for the above message. | 351 // Response to the renderer for the above message. |
352 IPC_MESSAGE_ROUTED3(ExtensionMsg_GetAppNotifyChannelResponse, | 352 IPC_MESSAGE_ROUTED3(ExtensionMsg_GetAppNotifyChannelResponse, |
353 std::string /* channel_id */, | 353 std::string /* channel_id */, |
354 std::string /* error */, | 354 std::string /* error */, |
355 int32 /* callback_id */) | 355 int32 /* callback_id */) |
356 | 356 |
357 // Deliver a message sent with ExtensionHostMsg_PostMessage. | 357 // Deliver a message sent with ExtensionHostMsg_PostMessage. |
358 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, | 358 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, |
359 int /* target_port_id */, | 359 int /* target_port_id */, |
360 std::string /* message */) | 360 std::string /* message */) |
OLD | NEW |