Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: chrome/common/extensions/extension_messages.h

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 #define CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_ 96 #define CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_
97 97
98 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need 98 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need
99 // to typedef it to avoid that. 99 // to typedef it to avoid that.
100 // Substitution map for l10n messages. 100 // Substitution map for l10n messages.
101 typedef std::map<std::string, std::string> SubstitutionMap; 101 typedef std::map<std::string, std::string> SubstitutionMap;
102 102
103 struct ExtensionMsg_Loaded_Params { 103 struct ExtensionMsg_Loaded_Params {
104 ExtensionMsg_Loaded_Params(); 104 ExtensionMsg_Loaded_Params();
105 ~ExtensionMsg_Loaded_Params(); 105 ~ExtensionMsg_Loaded_Params();
106 explicit ExtensionMsg_Loaded_Params(const Extension* extension); 106 explicit ExtensionMsg_Loaded_Params(const extensions::Extension* extension);
107 107
108 // Creates a new extension from the data in this object. 108 // Creates a new extension from the data in this object.
109 scoped_refptr<Extension> ConvertToExtension() const; 109 scoped_refptr<extensions::Extension> ConvertToExtension() const;
110 110
111 // The subset of the extension manifest data we send to renderers. 111 // The subset of the extension manifest data we send to renderers.
112 linked_ptr<DictionaryValue> manifest; 112 linked_ptr<DictionaryValue> manifest;
113 113
114 // The location the extension was installed from. 114 // The location the extension was installed from.
115 Extension::Location location; 115 extensions::Extension::Location location;
116 116
117 // The path the extension was loaded from. This is used in the renderer only 117 // The path the extension was loaded from. This is used in the renderer only
118 // to generate the extension ID for extensions that are loaded unpacked. 118 // to generate the extension ID for extensions that are loaded unpacked.
119 FilePath path; 119 FilePath path;
120 120
121 // The extension's active permissions. 121 // The extension's active permissions.
122 ExtensionAPIPermissionSet apis; 122 ExtensionAPIPermissionSet apis;
123 URLPatternSet explicit_hosts; 123 URLPatternSet explicit_hosts;
124 URLPatternSet scriptable_hosts; 124 URLPatternSet scriptable_hosts;
125 125
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 IPC_MESSAGE_CONTROL1(ExtensionMsg_Loaded, 207 IPC_MESSAGE_CONTROL1(ExtensionMsg_Loaded,
208 std::vector<ExtensionMsg_Loaded_Params>) 208 std::vector<ExtensionMsg_Loaded_Params>)
209 209
210 // Notifies the renderer that an extension was unloaded in the browser. 210 // Notifies the renderer that an extension was unloaded in the browser.
211 IPC_MESSAGE_CONTROL1(ExtensionMsg_Unloaded, 211 IPC_MESSAGE_CONTROL1(ExtensionMsg_Unloaded,
212 std::string) 212 std::string)
213 213
214 // Updates the scripting whitelist for extensions in the render process. This is 214 // Updates the scripting whitelist for extensions in the render process. This is
215 // only used for testing. 215 // only used for testing.
216 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetScriptingWhitelist, 216 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetScriptingWhitelist,
217 Extension::ScriptingWhitelist /* extenison ids */) 217 // extension ids
218 extensions::Extension::ScriptingWhitelist)
218 219
219 // Notification that renderer should run some JavaScript code. 220 // Notification that renderer should run some JavaScript code.
220 IPC_MESSAGE_ROUTED1(ExtensionMsg_ExecuteCode, 221 IPC_MESSAGE_ROUTED1(ExtensionMsg_ExecuteCode,
221 ExtensionMsg_ExecuteCode_Params) 222 ExtensionMsg_ExecuteCode_Params)
222 223
223 // Notification that the user scripts have been updated. It has one 224 // Notification that the user scripts have been updated. It has one
224 // SharedMemoryHandle argument consisting of the pickled script data. This 225 // SharedMemoryHandle argument consisting of the pickled script data. This
225 // handle is valid in the context of the renderer. 226 // handle is valid in the context of the renderer.
226 IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdateUserScripts, 227 IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdateUserScripts,
227 base::SharedMemoryHandle) 228 base::SharedMemoryHandle)
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_IncrementLazyKeepaliveCount) 437 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_IncrementLazyKeepaliveCount)
437 438
438 // Informs the browser there is one less thing keeping the lazy background page 439 // Informs the browser there is one less thing keeping the lazy background page
439 // alive. 440 // alive.
440 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_DecrementLazyKeepaliveCount) 441 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_DecrementLazyKeepaliveCount)
441 442
442 // Fetches a globally unique ID (for the lifetime of the browser) from the 443 // Fetches a globally unique ID (for the lifetime of the browser) from the
443 // browser process. 444 // browser process.
444 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID, 445 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID,
445 int /* unique_id */) 446 int /* unique_id */)
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_l10n_util_unittest.cc ('k') | chrome/common/extensions/extension_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698