Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: extensions/common/extension_messages.h

Issue 655273005: Implement AutomationNode.querySelector(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix heap-use-after-free issue by not keeping a scoped_ptr to automation_api_helper in extension_hel… Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/automation/tests/tabs/tab_id.js ('k') | extensions/extensions.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/extension_messages.h
diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h
index d2aadea6b5859d8bf80f4f5d9e9eda185d87a129..45160b61360beffa7d41e0315bfac127f1e3e771 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 */)
« no previous file with comments | « chrome/test/data/extensions/api_test/automation/tests/tabs/tab_id.js ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698