summaryrefslogtreecommitdiffstats
path: root/extensions/common/extension_messages.h
diff options
context:
space:
mode:
authoraboxhall <aboxhall@chromium.org>2014-11-05 18:03:05 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-06 02:04:15 +0000
commit7abfb3db96dc7d87c9f1282b5fc81328ec9c787c (patch)
treee371fa0db7b2963765dd8e8ff4a4b7cce18e19db /extensions/common/extension_messages.h
parentfb2145ccc9bf28832d63f16e5deeb727aa18b7e9 (diff)
downloadchromium_src-7abfb3db96dc7d87c9f1282b5fc81328ec9c787c.zip
chromium_src-7abfb3db96dc7d87c9f1282b5fc81328ec9c787c.tar.gz
chromium_src-7abfb3db96dc7d87c9f1282b5fc81328ec9c787c.tar.bz2
Implement AutomationNode.querySelector().
BUG=404710 Review URL: https://codereview.chromium.org/655273005 Cr-Commit-Position: refs/heads/master@{#302944}
Diffstat (limited to 'extensions/common/extension_messages.h')
-rw-r--r--extensions/common/extension_messages.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h
index d2aadea..45160b6 100644
--- a/extensions/common/extension_messages.h
+++ b/extensions/common/extension_messages.h
@@ -258,6 +258,14 @@ struct ExtensionMsg_Loaded_Params {
int creation_flags;
};
+struct ExtensionHostMsg_AutomationQuerySelector_Error {
+ enum Value { kNone, kNoMainFrame, kNoDocument, kNodeDestroyed };
+
+ ExtensionHostMsg_AutomationQuerySelector_Error() : value(kNone) {}
+
+ Value value;
+};
+
namespace IPC {
template <>
@@ -320,6 +328,14 @@ struct ParamTraits<ExtensionMsg_Loaded_Params> {
#endif // EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_
+IPC_ENUM_TRAITS_MAX_VALUE(
+ ExtensionHostMsg_AutomationQuerySelector_Error::Value,
+ ExtensionHostMsg_AutomationQuerySelector_Error::kNodeDestroyed)
+
+IPC_STRUCT_TRAITS_BEGIN(ExtensionHostMsg_AutomationQuerySelector_Error)
+IPC_STRUCT_TRAITS_MEMBER(value)
+IPC_STRUCT_TRAITS_END()
+
// Parameters structure for ExtensionMsg_UpdatePermissions.
IPC_STRUCT_BEGIN(ExtensionMsg_UpdatePermissions_Params)
IPC_STRUCT_MEMBER(std::string, extension_id)
@@ -750,3 +766,18 @@ IPC_MESSAGE_CONTROL4(ExtensionHostMsg_CreateMimeHandlerViewGuest,
std::string /* embedder_url */,
std::string /* mime_type */,
int /* element_instance_id */)
+
+// Sent when a query selector request is made from the automation API.
+// acc_obj_id is the accessibility tree ID of the starting element.
+IPC_MESSAGE_ROUTED3(ExtensionMsg_AutomationQuerySelector,
+ int /* request_id */,
+ int /* acc_obj_id */,
+ base::string16 /* selector */)
+
+// Result of a query selector request.
+// result_acc_obj_id is the accessibility tree ID of the result element; 0
+// indicates no result.
+IPC_MESSAGE_ROUTED3(ExtensionHostMsg_AutomationQuerySelector_Result,
+ int /* request_id */,
+ ExtensionHostMsg_AutomationQuerySelector_Error /* error */,
+ int /* result_acc_obj_id */)