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

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: 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
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 557b6d17262cbdc23d32503296aa2722024c5407..5761d26cd416839f32981f3772df40fe7cb24d82 100644
--- a/chrome/browser/extensions/api/automation_internal/automation_internal_api.h
+++ b/chrome/browser/extensions/api/automation_internal/automation_internal_api.h
@@ -77,6 +77,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