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

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

Issue 8542001: Insert default stylesheet for platform apps. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Roll batch into ExtensionMsg_Loaded. Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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
84 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need 84 // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need
85 // to typedef it to avoid that. 85 // to typedef it to avoid that.
86 // Substitution map for l10n messages. 86 // Substitution map for l10n messages.
87 typedef std::map<std::string, std::string> SubstitutionMap; 87 typedef std::map<std::string, std::string> SubstitutionMap;
88 88
89 struct ExtensionMsg_Loaded_Params { 89 struct ExtensionMsg_Loaded_Params {
90 ExtensionMsg_Loaded_Params(); 90 ExtensionMsg_Loaded_Params();
91 ~ExtensionMsg_Loaded_Params(); 91 ~ExtensionMsg_Loaded_Params();
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 // ExtensionMsg_Loaded uses a std:vector, so we need to be copyable
95 // copied inside the IPC machinery on gcc <= 4.2. 95 // and assignable.
96 ExtensionMsg_Loaded_Params(const ExtensionMsg_Loaded_Params& other); 96 ExtensionMsg_Loaded_Params(const ExtensionMsg_Loaded_Params& other);
97 ExtensionMsg_Loaded_Params& operator=(
98 const ExtensionMsg_Loaded_Params& other);
97 99
98 // Creates a new extension from the data in this object. 100 // Creates a new extension from the data in this object.
99 scoped_refptr<Extension> ConvertToExtension() const; 101 scoped_refptr<Extension> ConvertToExtension() const;
100 102
101 // The subset of the extension manifest data we send to renderers. 103 // The subset of the extension manifest data we send to renderers.
102 scoped_ptr<DictionaryValue> manifest; 104 scoped_ptr<DictionaryValue> manifest;
103 105
104 // The location the extension was installed from. 106 // The location the extension was installed from.
105 Extension::Location location; 107 Extension::Location location;
106 108
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // Marks an extension as 'active' in an extension process. 'Active' extensions 189 // Marks an extension as 'active' in an extension process. 'Active' extensions
188 // have more privileges than other extension content that might end up running 190 // have more privileges than other extension content that might end up running
189 // in the process (e.g. because of iframes or content scripts). 191 // in the process (e.g. because of iframes or content scripts).
190 IPC_MESSAGE_CONTROL1(ExtensionMsg_ActivateExtension, 192 IPC_MESSAGE_CONTROL1(ExtensionMsg_ActivateExtension,
191 std::string /* extension_id */) 193 std::string /* extension_id */)
192 194
193 // Marks an application as 'active' in a process. 195 // Marks an application as 'active' in a process.
194 IPC_MESSAGE_CONTROL1(ExtensionMsg_ActivateApplication, 196 IPC_MESSAGE_CONTROL1(ExtensionMsg_ActivateApplication,
195 std::string /* extension_id */) 197 std::string /* extension_id */)
196 198
197 // Notifies the renderer that an extension was loaded in the browser. 199 // Notifies the renderer that extensions were loaded in the browser.
198 IPC_MESSAGE_CONTROL1(ExtensionMsg_Loaded, 200 IPC_MESSAGE_CONTROL1(ExtensionMsg_Loaded,
199 ExtensionMsg_Loaded_Params) 201 std::vector<ExtensionMsg_Loaded_Params>)
200 202
201 // Notifies the renderer that an extension was unloaded in the browser. 203 // Notifies the renderer that an extension was unloaded in the browser.
202 IPC_MESSAGE_CONTROL1(ExtensionMsg_Unloaded, 204 IPC_MESSAGE_CONTROL1(ExtensionMsg_Unloaded,
203 std::string) 205 std::string)
204 206
205 // Updates the scripting whitelist for extensions in the render process. This is 207 // Updates the scripting whitelist for extensions in the render process. This is
206 // only used for testing. 208 // only used for testing.
207 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetScriptingWhitelist, 209 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetScriptingWhitelist,
208 Extension::ScriptingWhitelist /* extenison ids */) 210 Extension::ScriptingWhitelist /* extenison ids */)
209 211
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // Response to the renderer for the above message. 353 // Response to the renderer for the above message.
352 IPC_MESSAGE_ROUTED3(ExtensionMsg_GetAppNotifyChannelResponse, 354 IPC_MESSAGE_ROUTED3(ExtensionMsg_GetAppNotifyChannelResponse,
353 std::string /* channel_id */, 355 std::string /* channel_id */,
354 std::string /* error */, 356 std::string /* error */,
355 int32 /* callback_id */) 357 int32 /* callback_id */)
356 358
357 // Deliver a message sent with ExtensionHostMsg_PostMessage. 359 // Deliver a message sent with ExtensionHostMsg_PostMessage.
358 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, 360 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage,
359 int /* target_port_id */, 361 int /* target_port_id */,
360 std::string /* message */) 362 std::string /* message */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698