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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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_ |
OLD | NEW |