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_TRAITS_BEGIN(ui::AXNodeData
)
58 IPC_STRUCT_TRAITS_MEMBER(id
)
59 IPC_STRUCT_TRAITS_MEMBER(role
)
60 IPC_STRUCT_TRAITS_MEMBER(state
)
61 IPC_STRUCT_TRAITS_MEMBER(location
)
62 IPC_STRUCT_TRAITS_MEMBER(string_attributes
)
63 IPC_STRUCT_TRAITS_MEMBER(int_attributes
)
64 IPC_STRUCT_TRAITS_MEMBER(float_attributes
)
65 IPC_STRUCT_TRAITS_MEMBER(bool_attributes
)
66 IPC_STRUCT_TRAITS_MEMBER(intlist_attributes
)
67 IPC_STRUCT_TRAITS_MEMBER(html_attributes
)
68 IPC_STRUCT_TRAITS_MEMBER(child_ids
)
69 IPC_STRUCT_TRAITS_END()
71 IPC_STRUCT_TRAITS_BEGIN(ui::AXTreeUpdate
<ui::AXNodeData
>)
72 IPC_STRUCT_TRAITS_MEMBER(node_id_to_clear
)
73 IPC_STRUCT_TRAITS_MEMBER(nodes
)
74 IPC_STRUCT_TRAITS_END()
76 IPC_STRUCT_BEGIN(ExtensionMsg_AccessibilityEventParams
)
77 // ID of the accessibility tree that this event applies to.
78 IPC_STRUCT_MEMBER(int, tree_id
)
80 // The global offset of all coordinates in this accessibility tree.
81 IPC_STRUCT_MEMBER(gfx::Vector2d
, location_offset
)
84 IPC_STRUCT_MEMBER(ui::AXTreeUpdate
<ui::AXNodeData
>, update
)
87 IPC_STRUCT_MEMBER(ui::AXEvent
, event_type
)
89 // ID of the node that the event applies to.
90 IPC_STRUCT_MEMBER(int, id
)
93 // Forward an accessibility message to an extension process where an
94 // extension is using the automation API to listen for accessibility events.
95 IPC_MESSAGE_ROUTED1(ExtensionMsg_AccessibilityEvent
,
96 ExtensionMsg_AccessibilityEventParams
)
98 // Messages sent from the renderer to the browser.
101 // Sent by the renderer to implement chrome.webstore.install().
102 IPC_MESSAGE_ROUTED5(ExtensionHostMsg_InlineWebstoreInstall
,
103 int32
/* install id */,
104 int32
/* return route id */,
105 std::string
/* Web Store item ID */,
106 GURL
/* requestor URL */,
107 int /* listeners_mask */)