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

Unified Diff: chrome/browser/extensions/api/automation_internal/automation_internal_api.h

Issue 655273005: Implement AutomationNode.querySelector(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: devlin review comments Created 6 years, 2 months 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
Index: chrome/browser/extensions/api/automation_internal/automation_internal_api.h
diff --git a/chrome/browser/extensions/api/automation_internal/automation_internal_api.h b/chrome/browser/extensions/api/automation_internal/automation_internal_api.h
index 7912419461709a652dc48f9fb078a10d941fb6d3..a5a8b7e42d2d8d7153f2d37ef6bcacd96ffe2d3a 100644
--- a/chrome/browser/extensions/api/automation_internal/automation_internal_api.h
+++ b/chrome/browser/extensions/api/automation_internal/automation_internal_api.h
@@ -68,6 +68,28 @@ class AutomationInternalEnableDesktopFunction
ResponseAction Run() override;
};
+class AutomationInternalQuerySelectorFunction
+ : public UIThreadExtensionFunction {
+ DECLARE_EXTENSION_FUNCTION("automationInternal.querySelector",
+ AUTOMATIONINTERNAL_ENABLEDESKTOP)
+
+ public:
+ typedef base::Callback<void(const std::string& error,
+ int result_acc_obj_id)> Callback;
+
+ protected:
+ ~AutomationInternalQuerySelectorFunction() override {}
+
+ ResponseAction Run() override;
+
+ private:
+ void OnResponse(const std::string& error, int result_acc_obj_id);
+
+ // Used for assigning a unique ID to each request so that the response can be
+ // routed appropriately.
+ static int query_request_id_counter_;
+};
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_INTERNAL_API_H_

Powered by Google App Engine
This is Rietveld 408576698