| OLD | NEW |
| 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" |
| 11 #include "chrome/common/extensions/extension_permission_set.h" | 11 #include "chrome/common/extensions/extension_permission_set.h" |
| 12 #include "chrome/common/extensions/url_pattern.h" | 12 #include "chrome/common/extensions/url_pattern.h" |
| 13 #include "chrome/common/extensions/url_pattern_set.h" | 13 #include "chrome/common/extensions/url_pattern_set.h" |
| 14 #include "chrome/common/view_type.h" | 14 #include "chrome/common/view_type.h" |
| 15 #include "chrome/common/web_apps.h" | 15 #include "chrome/common/web_apps.h" |
| 16 #include "content/public/common/common_param_traits.h" |
| 16 #include "ipc/ipc_message_macros.h" | 17 #include "ipc/ipc_message_macros.h" |
| 17 | 18 |
| 18 #define IPC_MESSAGE_START ExtensionMsgStart | 19 #define IPC_MESSAGE_START ExtensionMsgStart |
| 19 | 20 |
| 20 IPC_ENUM_TRAITS(chrome::ViewType) | 21 IPC_ENUM_TRAITS(chrome::ViewType) |
| 21 | 22 |
| 22 // Parameters structure for ExtensionHostMsg_Request. | 23 // Parameters structure for ExtensionHostMsg_Request. |
| 23 IPC_STRUCT_BEGIN(ExtensionHostMsg_Request_Params) | 24 IPC_STRUCT_BEGIN(ExtensionHostMsg_Request_Params) |
| 24 // Message name. | 25 // Message name. |
| 25 IPC_STRUCT_MEMBER(std::string, name) | 26 IPC_STRUCT_MEMBER(std::string, name) |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 | 319 |
| 319 // Dispatch the Port.onDisconnect event for message channels. | 320 // Dispatch the Port.onDisconnect event for message channels. |
| 320 IPC_MESSAGE_ROUTED2(ExtensionMsg_DispatchOnDisconnect, | 321 IPC_MESSAGE_ROUTED2(ExtensionMsg_DispatchOnDisconnect, |
| 321 int /* port_id */, | 322 int /* port_id */, |
| 322 bool /* connection_error */) | 323 bool /* connection_error */) |
| 323 | 324 |
| 324 // Informs the renderer what channel (dev, beta, stable, etc) is running. | 325 // Informs the renderer what channel (dev, beta, stable, etc) is running. |
| 325 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetChannel, | 326 IPC_MESSAGE_CONTROL1(ExtensionMsg_SetChannel, |
| 326 int /* channel */) | 327 int /* channel */) |
| 327 | 328 |
| 329 // Adds a logging message to the renderer's root frame DevTools console. |
| 330 IPC_MESSAGE_ROUTED2(ExtensionMsg_AddMessageToConsole, |
| 331 content::ConsoleMessageLevel /* level */, |
| 332 std::string /* message */) |
| 333 |
| 328 // Messages sent from the renderer to the browser. | 334 // Messages sent from the renderer to the browser. |
| 329 | 335 |
| 330 // A renderer sends this message when an extension process starts an API | 336 // A renderer sends this message when an extension process starts an API |
| 331 // request. The browser will always respond with a ExtensionMsg_Response. | 337 // request. The browser will always respond with a ExtensionMsg_Response. |
| 332 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request, | 338 IPC_MESSAGE_ROUTED1(ExtensionHostMsg_Request, |
| 333 ExtensionHostMsg_Request_Params) | 339 ExtensionHostMsg_Request_Params) |
| 334 | 340 |
| 335 // A renderer sends this message when an extension process starts an API | 341 // A renderer sends this message when an extension process starts an API |
| 336 // request. The browser will always respond with a ExtensionMsg_Response. | 342 // request. The browser will always respond with a ExtensionMsg_Response. |
| 337 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread, | 343 IPC_MESSAGE_CONTROL2(ExtensionHostMsg_RequestForIOThread, |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_IncrementLazyKeepaliveCount) | 471 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_IncrementLazyKeepaliveCount) |
| 466 | 472 |
| 467 // Informs the browser there is one less thing keeping the lazy background page | 473 // Informs the browser there is one less thing keeping the lazy background page |
| 468 // alive. | 474 // alive. |
| 469 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_DecrementLazyKeepaliveCount) | 475 IPC_MESSAGE_ROUTED0(ExtensionHostMsg_DecrementLazyKeepaliveCount) |
| 470 | 476 |
| 471 // Fetches a globally unique ID (for the lifetime of the browser) from the | 477 // Fetches a globally unique ID (for the lifetime of the browser) from the |
| 472 // browser process. | 478 // browser process. |
| 473 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID, | 479 IPC_SYNC_MESSAGE_CONTROL0_1(ExtensionHostMsg_GenerateUniqueID, |
| 474 int /* unique_id */) | 480 int /* unique_id */) |
| OLD | NEW |