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 <string>
12
13#include "base/strings/string16.h"
14#include "base/values.h"
15#include "chrome/common/extensions/api/webstore/webstore_api_constants.h"
16#include "chrome/common/extensions/webstore_install_result.h"
17#include "extensions/common/stack_frame.h"
18#include "ipc/ipc_message_macros.h"
19#include "url/gurl.h"
20
21#define IPC_MESSAGE_START ChromeExtensionMsgStart
22
23IPC_ENUM_TRAITS_MAX_VALUE(extensions::api::webstore::InstallStage,
24                          extensions::api::webstore::INSTALL_STAGE_INSTALLING)
25IPC_ENUM_TRAITS_MAX_VALUE(extensions::webstore_install::Result,
26                          extensions::webstore_install::RESULT_LAST)
27
28// Messages sent from the browser to the renderer.
29
30// Toggles visual muting of the render view area. This is on when a constrained
31// window is showing.
32IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized,
33                    bool /* deemphazied */)
34
35// Sent to the renderer if install stage updates were requested for an inline
36// install.
37IPC_MESSAGE_ROUTED1(ExtensionMsg_InlineInstallStageChanged,
38                    extensions::api::webstore::InstallStage /* stage */)
39
40// Sent to the renderer if download progress updates were requested for an
41// inline install.
42IPC_MESSAGE_ROUTED1(ExtensionMsg_InlineInstallDownloadProgress,
43                    int /* percent_downloaded */)
44
45// Send to renderer once the installation mentioned on
46// ExtensionHostMsg_InlineWebstoreInstall is complete.
47IPC_MESSAGE_ROUTED4(ExtensionMsg_InlineWebstoreInstallResponse,
48                    int32 /* install id */,
49                    bool /* whether the install was successful */,
50                    std::string /* error */,
51                    extensions::webstore_install::Result /* result */)
52
53// Messages sent from the renderer to the browser.
54
55
56// Sent by the renderer to implement chrome.webstore.install().
57IPC_MESSAGE_ROUTED5(ExtensionHostMsg_InlineWebstoreInstall,
58                    int32 /* install id */,
59                    int32 /* return route id */,
60                    std::string /* Web Store item ID */,
61                    GURL /* requestor URL */,
62                    int /* listeners_mask */)
63