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 3// found in the LICENSE file. 4 5// Chrome-specific IPC messages for extensions. 6// Extension-related messages that aren't specific to Chrome live in 7// extensions/common/extension_messages.h. 8// 9// Multiply-included message file, hence no include guard. 10 11#include "chrome/common/extensions/api/webstore/webstore_api_constants.h" 12#include "chrome/common/web_application_info.h" 13#include "ipc/ipc_message_macros.h" 14 15#define IPC_MESSAGE_START ChromeExtensionMsgStart 16 17IPC_ENUM_TRAITS_MAX_VALUE(extensions::api::webstore::InstallStage, 18 extensions::api::webstore::INSTALL_STAGE_INSTALLING) 19 20IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo) 21 IPC_STRUCT_TRAITS_MEMBER(url) 22 IPC_STRUCT_TRAITS_MEMBER(width) 23 IPC_STRUCT_TRAITS_MEMBER(height) 24 IPC_STRUCT_TRAITS_MEMBER(data) 25IPC_STRUCT_TRAITS_END() 26 27IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo) 28 IPC_STRUCT_TRAITS_MEMBER(title) 29 IPC_STRUCT_TRAITS_MEMBER(description) 30 IPC_STRUCT_TRAITS_MEMBER(app_url) 31 IPC_STRUCT_TRAITS_MEMBER(icons) 32IPC_STRUCT_TRAITS_END() 33 34// Messages sent from the browser to the renderer. 35 36// Requests application info for the page. The renderer responds back with 37// ExtensionHostMsg_DidGetApplicationInfo. 38IPC_MESSAGE_ROUTED1(ChromeExtensionMsg_GetApplicationInfo, 39 int32 /* page_id */) 40 41// Sent by the renderer to implement chrome.webstore.install(). 42IPC_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. 51IPC_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. 56IPC_MESSAGE_ROUTED1(ExtensionMsg_InlineInstallDownloadProgress, 57 int /* percent_downloaded */) 58 59// Send to renderer once the installation mentioned on 60// ExtensionHostMsg_InlineWebstoreInstall is complete. 61IPC_MESSAGE_ROUTED3(ExtensionMsg_InlineWebstoreInstallResponse, 62 int32 /* install id */, 63 bool /* whether the install was successful */, 64 std::string /* error */) 65 66// Messages sent from the renderer to the browser. 67 68IPC_MESSAGE_ROUTED2(ChromeExtensionHostMsg_DidGetApplicationInfo, 69 int32 /* page_id */, 70 WebApplicationInfo) 71