OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Chrome-specific IPC messages for extensions. | 5 // Chrome-specific IPC messages for extensions. |
6 // Extension-related messages that aren't specific to Chrome live in | 6 // Extension-related messages that aren't specific to Chrome live in |
7 // extensions/common/extension_messages.h. | 7 // extensions/common/extension_messages.h. |
8 // | 8 // |
9 // Multiply-included message file, hence no include guard. | 9 // Multiply-included message file, hence no include guard. |
10 | 10 |
| 11 #include "chrome/common/extensions/api/webstore/webstore_api_constants.h" |
11 #include "chrome/common/web_application_info.h" | 12 #include "chrome/common/web_application_info.h" |
12 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
13 | 14 |
14 #define IPC_MESSAGE_START ChromeExtensionMsgStart | 15 #define IPC_MESSAGE_START ChromeExtensionMsgStart |
15 | 16 |
| 17 IPC_ENUM_TRAITS_MAX_VALUE(extensions::api::webstore::InstallStage, |
| 18 extensions::api::webstore::INSTALL_STAGE_INSTALLING) |
| 19 |
16 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo) | 20 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo) |
17 IPC_STRUCT_TRAITS_MEMBER(url) | 21 IPC_STRUCT_TRAITS_MEMBER(url) |
18 IPC_STRUCT_TRAITS_MEMBER(width) | 22 IPC_STRUCT_TRAITS_MEMBER(width) |
19 IPC_STRUCT_TRAITS_MEMBER(height) | 23 IPC_STRUCT_TRAITS_MEMBER(height) |
20 IPC_STRUCT_TRAITS_MEMBER(data) | 24 IPC_STRUCT_TRAITS_MEMBER(data) |
21 IPC_STRUCT_TRAITS_END() | 25 IPC_STRUCT_TRAITS_END() |
22 | 26 |
23 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo) | 27 IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo) |
24 IPC_STRUCT_TRAITS_MEMBER(title) | 28 IPC_STRUCT_TRAITS_MEMBER(title) |
25 IPC_STRUCT_TRAITS_MEMBER(description) | 29 IPC_STRUCT_TRAITS_MEMBER(description) |
26 IPC_STRUCT_TRAITS_MEMBER(app_url) | 30 IPC_STRUCT_TRAITS_MEMBER(app_url) |
27 IPC_STRUCT_TRAITS_MEMBER(icons) | 31 IPC_STRUCT_TRAITS_MEMBER(icons) |
28 IPC_STRUCT_TRAITS_END() | 32 IPC_STRUCT_TRAITS_END() |
29 | 33 |
30 // Messages sent from the browser to the renderer. | 34 // Messages sent from the browser to the renderer. |
31 | 35 |
32 // Requests application info for the page. The renderer responds back with | 36 // Requests application info for the page. The renderer responds back with |
33 // ExtensionHostMsg_DidGetApplicationInfo. | 37 // ExtensionHostMsg_DidGetApplicationInfo. |
34 IPC_MESSAGE_ROUTED1(ChromeExtensionMsg_GetApplicationInfo, | 38 IPC_MESSAGE_ROUTED1(ChromeExtensionMsg_GetApplicationInfo, |
35 int32 /* page_id */) | 39 int32 /* page_id */) |
36 | 40 |
| 41 // Sent by the renderer to implement chrome.webstore.install(). |
| 42 IPC_MESSAGE_ROUTED5(ExtensionHostMsg_InlineWebstoreInstall, |
| 43 int32 /* install id */, |
| 44 int32 /* return route id */, |
| 45 std::string /* Web Store item ID */, |
| 46 GURL /* requestor URL */, |
| 47 int /* listeners_mask */) |
| 48 |
| 49 // Sent to the renderer if install stage updates were requested for an inline |
| 50 // install. |
| 51 IPC_MESSAGE_ROUTED1(ExtensionMsg_InlineInstallStageChanged, |
| 52 extensions::api::webstore::InstallStage /* stage */) |
| 53 |
| 54 // Sent to the renderer if download progress updates were requested for an |
| 55 // inline install. |
| 56 IPC_MESSAGE_ROUTED1(ExtensionMsg_InlineInstallDownloadProgress, |
| 57 int /* percent_downloaded */) |
| 58 |
| 59 // Send to renderer once the installation mentioned on |
| 60 // ExtensionHostMsg_InlineWebstoreInstall is complete. |
| 61 IPC_MESSAGE_ROUTED3(ExtensionMsg_InlineWebstoreInstallResponse, |
| 62 int32 /* install id */, |
| 63 bool /* whether the install was successful */, |
| 64 std::string /* error */) |
| 65 |
37 // Messages sent from the renderer to the browser. | 66 // Messages sent from the renderer to the browser. |
38 | 67 |
39 IPC_MESSAGE_ROUTED2(ChromeExtensionHostMsg_DidGetApplicationInfo, | 68 IPC_MESSAGE_ROUTED2(ChromeExtensionHostMsg_DidGetApplicationInfo, |
40 int32 /* page_id */, | 69 int32 /* page_id */, |
41 WebApplicationInfo) | 70 WebApplicationInfo) |
OLD | NEW |