OLD | NEW |
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 class AutomationInternalEnableDesktopFunction | 70 class AutomationInternalEnableDesktopFunction |
71 : public UIThreadExtensionFunction { | 71 : public UIThreadExtensionFunction { |
72 DECLARE_EXTENSION_FUNCTION("automationInternal.enableDesktop", | 72 DECLARE_EXTENSION_FUNCTION("automationInternal.enableDesktop", |
73 AUTOMATIONINTERNAL_ENABLEDESKTOP) | 73 AUTOMATIONINTERNAL_ENABLEDESKTOP) |
74 protected: | 74 protected: |
75 ~AutomationInternalEnableDesktopFunction() override {} | 75 ~AutomationInternalEnableDesktopFunction() override {} |
76 | 76 |
77 ResponseAction Run() override; | 77 ResponseAction Run() override; |
78 }; | 78 }; |
79 | 79 |
| 80 class AutomationInternalQuerySelectorFunction |
| 81 : public UIThreadExtensionFunction { |
| 82 DECLARE_EXTENSION_FUNCTION("automationInternal.querySelector", |
| 83 AUTOMATIONINTERNAL_ENABLEDESKTOP) |
| 84 |
| 85 public: |
| 86 typedef base::Callback<void(const std::string& error, |
| 87 int result_acc_obj_id)> Callback; |
| 88 |
| 89 protected: |
| 90 ~AutomationInternalQuerySelectorFunction() override {} |
| 91 |
| 92 ResponseAction Run() override; |
| 93 |
| 94 private: |
| 95 void OnResponse(const std::string& error, int result_acc_obj_id); |
| 96 |
| 97 // Used for assigning a unique ID to each request so that the response can be |
| 98 // routed appropriately. |
| 99 static int query_request_id_counter_; |
| 100 }; |
| 101 |
80 } // namespace extensions | 102 } // namespace extensions |
81 | 103 |
82 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_INTERNAL
_API_H_ | 104 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_INTERNAL
_API_H_ |
OLD | NEW |