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.
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.
9 // Multiply-included message file, hence no include guard.
13 #include "base/strings/string16.h"
14 #include "base/values.h"
15 #include "chrome/common/extensions/api/automation_internal.h"
16 #include "chrome/common/extensions/api/webstore/webstore_api_constants.h"
17 #include "chrome/common/extensions/webstore_install_result.h"
18 #include "extensions/common/stack_frame.h"
19 #include "ipc/ipc_message_macros.h"
20 #include "ui/accessibility/ax_enums.h"
21 #include "ui/accessibility/ax_node_data.h"
22 #include "ui/accessibility/ax_tree_update.h"
25 #define IPC_MESSAGE_START ChromeExtensionMsgStart
27 IPC_ENUM_TRAITS_MAX_VALUE(extensions::api::webstore::InstallStage
,
28 extensions::api::webstore::INSTALL_STAGE_INSTALLING
)
29 IPC_ENUM_TRAITS_MAX_VALUE(extensions::webstore_install::Result
,
30 extensions::webstore_install::RESULT_LAST
)
32 // Messages sent from the browser to the renderer.
34 // Toggles visual muting of the render view area. This is on when a constrained
36 IPC_MESSAGE_ROUTED1(ChromeViewMsg_SetVisuallyDeemphasized
,
37 bool /* deemphazied */)
39 // Sent to the renderer if install stage updates were requested for an inline
41 IPC_MESSAGE_ROUTED1(ExtensionMsg_InlineInstallStageChanged
,
42 extensions::api::webstore::InstallStage
/* stage */)
44 // Sent to the renderer if download progress updates were requested for an
46 IPC_MESSAGE_ROUTED1(ExtensionMsg_InlineInstallDownloadProgress
,
47 int /* percent_downloaded */)
49 // Send to renderer once the installation mentioned on
50 // ExtensionHostMsg_InlineWebstoreInstall is complete.
51 IPC_MESSAGE_ROUTED4(ExtensionMsg_InlineWebstoreInstallResponse
,
52 int32
/* install id */,
53 bool /* whether the install was successful */,
54 std::string
/* error */,
55 extensions::webstore_install::Result
/* result */)
57 IPC_STRUCT_BEGIN(ExtensionMsg_AccessibilityEventParams
)
58 // ID of the accessibility tree that this event applies to.
59 IPC_STRUCT_MEMBER(int, tree_id
)
61 // The global offset of all coordinates in this accessibility tree.
62 IPC_STRUCT_MEMBER(gfx::Vector2d
, location_offset
)
65 IPC_STRUCT_MEMBER(ui::AXTreeUpdate
, update
)
68 IPC_STRUCT_MEMBER(ui::AXEvent
, event_type
)
70 // ID of the node that the event applies to.
71 IPC_STRUCT_MEMBER(int, id
)
74 // Forward an accessibility message to an extension process where an
75 // extension is using the automation API to listen for accessibility events.
76 IPC_MESSAGE_ROUTED1(ExtensionMsg_AccessibilityEvent
,
77 ExtensionMsg_AccessibilityEventParams
)
79 // Messages sent from the renderer to the browser.
82 // Sent by the renderer to implement chrome.webstore.install().
83 IPC_MESSAGE_ROUTED5(ExtensionHostMsg_InlineWebstoreInstall
,
84 int32
/* install id */,
85 int32
/* return route id */,
86 std::string
/* Web Store item ID */,
87 GURL
/* requestor URL */,
88 int /* listeners_mask */)