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

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

Issue 9958147: Fix some uses of global variables in transient pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 IPC_MESSAGE_CONTROL2(ExtensionMsg_ShouldUnload, 249 IPC_MESSAGE_CONTROL2(ExtensionMsg_ShouldUnload,
250 std::string /* extension_id */, 250 std::string /* extension_id */,
251 int /* sequence_id */) 251 int /* sequence_id */)
252 252
253 // If we complete a round of ShouldUnload->ShouldUnloadAck messages without the 253 // If we complete a round of ShouldUnload->ShouldUnloadAck messages without the
254 // lazy background page becoming active again, we are ready to unload. This 254 // lazy background page becoming active again, we are ready to unload. This
255 // message tells the page to dispatch the unload event. 255 // message tells the page to dispatch the unload event.
256 IPC_MESSAGE_CONTROL1(ExtensionMsg_Unload, 256 IPC_MESSAGE_CONTROL1(ExtensionMsg_Unload,
257 std::string /* extension_id */) 257 std::string /* extension_id */)
258 258
259 // Send to renderer once the installation mentioned on
260 // ExtensionHostMsg_InlineWebstoreInstall is complete.
261 IPC_MESSAGE_ROUTED3(ExtensionMsg_InlineWebstoreInstallResponse,
262 int32 /* install id */,
263 bool /* whether the install was successful */,
264 std::string /* error */)
265
266 // Response to the renderer for the above message.
Yoyo Zhou 2012/04/04 18:52:24 "the above message" was already wrong, but change
Matt Perry 2012/04/04 19:21:44 Done.
267 IPC_MESSAGE_ROUTED3(ExtensionMsg_GetAppNotifyChannelResponse,
268 std::string /* channel_id */,
269 std::string /* error */,
270 int32 /* callback_id */)
271
272 // Dispatch the Port.onConnect event for message channels.
273 IPC_MESSAGE_ROUTED5(ExtensionMsg_DispatchOnConnect,
274 int /* target_port_id */,
275 std::string /* channel_name */,
276 std::string /* tab_json */,
277 std::string /* source_extension_id */,
278 std::string /* target_extension_id */)
279
280 // Deliver a message sent with ExtensionHostMsg_PostMessage.
281 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage,
282 int /* target_port_id */,
283 std::string /* message */)
284
285 IPC_MESSAGE_ROUTED2(ExtensionMsg_DispatchOnDisconnect,
286 int /* port_id */,
287 bool /* connection_error */)
288
259 // Messages sent from the renderer to the browser. 289 // Messages sent from the renderer to the browser.
260 290
261 // A renderer sends this message when an extension process starts an API 291 // A renderer sends this message when an extension process starts an API
262 // request. The browser will always respond with a ExtensionMsg_Response. 292 // request. The browser will always respond with a ExtensionMsg_Response.
263 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request, 293 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request,
264 ExtensionHostMsg_Request_Params) 294 ExtensionHostMsg_Request_Params)
265 295
266 // A renderer sends this message when an extension process starts an API 296 // A renderer sends this message when an extension process starts an API
267 // request. The browser will always respond with a ExtensionMsg_Response. 297 // request. The browser will always respond with a ExtensionMsg_Response.
268 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread, 298 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_InstallApplication, 378 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_InstallApplication,
349 WebApplicationInfo) 379 WebApplicationInfo)
350 380
351 // Sent by the renderer to implement chrome.webstore.install(). 381 // Sent by the renderer to implement chrome.webstore.install().
352 IPC_MESSAGE_ROUTED4(ExtensionHostMsg_InlineWebstoreInstall, 382 IPC_MESSAGE_ROUTED4(ExtensionHostMsg_InlineWebstoreInstall,
353 int32 /* install id */, 383 int32 /* install id */,
354 int32 /* return route id */, 384 int32 /* return route id */,
355 std::string /* Web Store item ID */, 385 std::string /* Web Store item ID */,
356 GURL /* requestor URL */) 386 GURL /* requestor URL */)
357 387
358 // Send to renderer once the installation mentioned above is complete.
359 IPC_MESSAGE_ROUTED3(ExtensionMsg_InlineWebstoreInstallResponse,
Matt Perry 2012/04/04 00:32:42 I moved the ExtensionMsg's up to their section.
360 int32 /* install id */,
361 bool /* whether the install was successful */,
362 std::string /* error */)
363
364 // Sent by the renderer when an App is requesting permission to send server 388 // Sent by the renderer when an App is requesting permission to send server
365 // pushed notifications. 389 // pushed notifications.
366 IPC_MESSAGE_ROUTED4(ExtensionHostMsg_GetAppNotifyChannel, 390 IPC_MESSAGE_ROUTED4(ExtensionHostMsg_GetAppNotifyChannel,
367 GURL /* requestor_url */, 391 GURL /* requestor_url */,
368 std::string /* client_id */, 392 std::string /* client_id */,
369 int32 /* return_route_id */, 393 int32 /* return_route_id */,
370 int32 /* callback_id */) 394 int32 /* callback_id */)
371 395
372 // Optional Ack message sent to the browser to notify that the response to a 396 // Optional Ack message sent to the browser to notify that the response to a
373 // function has been processed. 397 // function has been processed.
374 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_ResponseAck, 398 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_ResponseAck,
375 int /* request_id */) 399 int /* request_id */)
376 400
377 // Response to ExtensionMsg_ShouldUnload. 401 // Response to ExtensionMsg_ShouldUnload.
378 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_ShouldUnloadAck, 402 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_ShouldUnloadAck,
379 std::string /* extension_id */, 403 std::string /* extension_id */,
380 int /* sequence_id */) 404 int /* sequence_id */)
381 405
382 // Response to ExtensionMsg_Unload, after we dispatch the unload event. 406 // Response to ExtensionMsg_Unload, after we dispatch the unload event.
383 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_UnloadAck, 407 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_UnloadAck,
384 std::string /* extension_id */) 408 std::string /* extension_id */)
385 409
386 // Response to the renderer for the above message. 410 // Informs the browser to increment the keepalive count for the lazy background
387 IPC_MESSAGE_ROUTED3(ExtensionMsg_GetAppNotifyChannelResponse, 411 // page, keeping it alive.
388 std::string /* channel_id */, 412 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_IncrementLazyKeepaliveCount,
389 std::string /* error */, 413 std::string /* extension_id */)
390 int32 /* callback_id */)
391 414
392 // Dispatch the Port.onConnect event for message channels. 415 // Informs the browser there is one less thing keeping the lazy background page
393 IPC_MESSAGE_ROUTED5(ExtensionMsg_DispatchOnConnect, 416 // alive.
394 int /* target_port_id */, 417 IPC_MESSAGE_CONTROL1(ExtensionHostMsg_DecrementLazyKeepaliveCount,
395 std::string /* channel_name */, 418 std::string /* extension_id */)
396 std::string /* tab_json */,
397 std::string /* source_extension_id */,
398 std::string /* target_extension_id */)
399 419
400 // Deliver a message sent with ExtensionHostMsg_PostMessage. 420 // Fetches a globally unique ID (for the lifetime of the browser) from the
401 IPC_MESSAGE_ROUTED2(ExtensionMsg_DeliverMessage, 421 // browser process.
402 int /* target_port_id */, 422 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID,
403 std::string /* message */) 423 int /* unique_id */)
404
405 IPC_MESSAGE_ROUTED2(ExtensionMsg_DispatchOnDisconnect,
406 int /* port_id */,
407 bool /* connection_error */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698