| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 #define CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_ | 84 #define CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_ |
| 85 | 85 |
| 86 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need | 86 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need |
| 87 // to typedef it to avoid that. | 87 // to typedef it to avoid that. |
| 88 // Substitution map for l10n messages. | 88 // Substitution map for l10n messages. |
| 89 typedef std::map<std::string, std::string> SubstitutionMap; | 89 typedef std::map<std::string, std::string> SubstitutionMap; |
| 90 | 90 |
| 91 struct ExtensionMsg_Loaded_Params { | 91 struct ExtensionMsg_Loaded_Params { |
| 92 ExtensionMsg_Loaded_Params(); | 92 ExtensionMsg_Loaded_Params(); |
| 93 ~ExtensionMsg_Loaded_Params(); | 93 ~ExtensionMsg_Loaded_Params(); |
| 94 explicit ExtensionMsg_Loaded_Params( | 94 explicit ExtensionMsg_Loaded_Params(const Extension* extension); |
| 95 const Extension* extension, | |
| 96 const ExtensionPermissionSet* active_permissions); | |
| 97 | 95 |
| 98 // A copy constructor is needed because this structure can end up getting | 96 // A copy constructor is needed because this structure can end up getting |
| 99 // copied inside the IPC machinery on gcc <= 4.2. | 97 // copied inside the IPC machinery on gcc <= 4.2. |
| 100 ExtensionMsg_Loaded_Params(const ExtensionMsg_Loaded_Params& other); | 98 ExtensionMsg_Loaded_Params(const ExtensionMsg_Loaded_Params& other); |
| 101 | 99 |
| 102 // Creates a new extension from the data in this object. | 100 // Creates a new extension from the data in this object. |
| 103 scoped_refptr<Extension> ConvertToExtension() const; | 101 scoped_refptr<Extension> ConvertToExtension() const; |
| 104 | 102 |
| 105 // Passes ownership to the caller. | |
| 106 const ExtensionPermissionSet* GetActivePermissions() const; | |
| 107 | |
| 108 // The subset of the extension manifest data we send to renderers. | 103 // The subset of the extension manifest data we send to renderers. |
| 109 scoped_ptr<DictionaryValue> manifest; | 104 scoped_ptr<DictionaryValue> manifest; |
| 110 | 105 |
| 111 // The location the extension was installed from. | 106 // The location the extension was installed from. |
| 112 Extension::Location location; | 107 Extension::Location location; |
| 113 | 108 |
| 114 // The path the extension was loaded from. This is used in the renderer only | 109 // The path the extension was loaded from. This is used in the renderer only |
| 115 // to generate the extension ID for extensions that are loaded unpacked. | 110 // to generate the extension ID for extensions that are loaded unpacked. |
| 116 FilePath path; | 111 FilePath path; |
| 117 | 112 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 bool /* whether the script ran successfully */, | 306 bool /* whether the script ran successfully */, |
| 312 std::string /* error message */) | 307 std::string /* error message */) |
| 313 | 308 |
| 314 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_DidGetApplicationInfo, | 309 IPC_MESSAGE_ROUTED2(ExtensionHostMsg_DidGetApplicationInfo, |
| 315 int32 /* page_id */, | 310 int32 /* page_id */, |
| 316 WebApplicationInfo) | 311 WebApplicationInfo) |
| 317 | 312 |
| 318 // Sent by the renderer to implement chrome.app.installApplication(). | 313 // Sent by the renderer to implement chrome.app.installApplication(). |
| 319 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_InstallApplication, | 314 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_InstallApplication, |
| 320 WebApplicationInfo) | 315 WebApplicationInfo) |
| OLD | NEW |