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

Side by Side 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: Address comments 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_INTERNAL_AP I_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_INTERNAL_AP I_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_INTERNAL_AP I_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_INTERNAL_AP I_H_
7 7
8 #include "chrome/browser/extensions/chrome_extension_function.h" 8 #include "chrome/browser/extensions/chrome_extension_function.h"
9 #include "content/public/browser/web_contents_observer.h" 9 #include "content/public/browser/web_contents_observer.h"
10 #include "content/public/browser/web_contents_user_data.h" 10 #include "content/public/browser/web_contents_user_data.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 class AutomationInternalEnableDesktopFunction 61 class AutomationInternalEnableDesktopFunction
62 : public UIThreadExtensionFunction { 62 : public UIThreadExtensionFunction {
63 DECLARE_EXTENSION_FUNCTION("automationInternal.enableDesktop", 63 DECLARE_EXTENSION_FUNCTION("automationInternal.enableDesktop",
64 AUTOMATIONINTERNAL_ENABLEDESKTOP) 64 AUTOMATIONINTERNAL_ENABLEDESKTOP)
65 protected: 65 protected:
66 ~AutomationInternalEnableDesktopFunction() override {} 66 ~AutomationInternalEnableDesktopFunction() override {}
67 67
68 ResponseAction Run() override; 68 ResponseAction Run() override;
69 }; 69 };
70 70
71 class AutomationInternalQuerySelectorFunction
72 : public UIThreadExtensionFunction {
73 DECLARE_EXTENSION_FUNCTION("automationInternal.querySelector",
74 AUTOMATIONINTERNAL_ENABLEDESKTOP)
75
76 public:
77 typedef base::Callback<void(const std::string& error,
78 int result_acc_obj_id)> Callback;
79
80 protected:
81 virtual ~AutomationInternalQuerySelectorFunction() {}
Devlin 2014/10/29 21:23:43 same comments on virtual/override here.
aboxhall 2014/10/30 18:34:18 Done.
82
83 virtual ResponseAction Run() override;
84
85 private:
86 void OnResponse(const std::string& error, int result_acc_obj_id);
87
88 // Used for assigning a unique ID to each request so that the response can be
89 // routed appropriately.
90 static int query_request_id_counter_;
91 };
92
71 } // namespace extensions 93 } // namespace extensions
72 94
73 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_INTERNAL _API_H_ 95 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_INTERNAL _API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698