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

Unified Diff: chrome/browser/automation/testing_automation_provider.h

Issue 10534163: First pass at refactoring pyautolib in preparation for removing proxy dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Previous commit was reverted. Changed IPCs to be backwards compatible with old chrome binaries. Created 8 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/testing_automation_provider.h
diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h
index a723303173c2f5165e24b7564f50d581bfce6f92..e91689770c947d767389c703d7d43970b2053542 100644
--- a/chrome/browser/automation/testing_automation_provider.h
+++ b/chrome/browser/automation/testing_automation_provider.h
@@ -246,7 +246,13 @@ class TestingAutomationProvider : public AutomationProvider,
// Generic pattern for pyautolib
// Uses the JSON interface for input/output.
- void SendJSONRequest(int handle,
+ void SendJSONRequestWithBrowserHandle(int handle,
+ const std::string& json_request,
+ IPC::Message* reply_message);
+ void SendJSONRequestWithBrowserIndex(int index,
+ const std::string& json_request,
+ IPC::Message* reply_message);
+ void SendJSONRequest(Browser* browser,
const std::string& json_request,
IPC::Message* reply_message);
@@ -262,6 +268,13 @@ class TestingAutomationProvider : public AutomationProvider,
base::DictionaryValue*,
IPC::Message*);
+ // JSON interface helper functions.
+ static scoped_ptr<DictionaryValue> ParseJSONRequestCommand(
+ const std::string& json_request,
+ std::string* command,
+ std::string* error);
+ void BuildJSONHandlerMaps();
+
// Set window dimensions.
// Uses the JSON interface for input/output.
void SetWindowDimensions(Browser* browser,
@@ -1555,6 +1568,9 @@ class TestingAutomationProvider : public AutomationProvider,
PowerManagerClientObserverForTesting* power_manager_observer_;
#endif // defined(OS_CHROMEOS)
+ std::map<std::string, JsonHandler> handler_map_;
+ std::map<std::string, BrowserJsonHandler> browser_handler_map_;
+
// Used to wait on various browser sync events.
scoped_ptr<ProfileSyncServiceHarness> sync_waiter_;
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698