diff options
author | craigdh@chromium.org <craigdh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-27 23:48:24 +0000 |
---|---|---|
committer | craigdh@chromium.org <craigdh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-27 23:48:24 +0000 |
commit | 081d3e316f6dd3511037dd06b58d535757631f08 (patch) | |
tree | 4d8a9a5e047999bd86ffd792e00118a44a2042da /chrome/browser/automation/testing_automation_provider.h | |
parent | 95dc91e957020ab6cdc733b2ede68ee72c4b3177 (diff) | |
download | chromium_src-081d3e316f6dd3511037dd06b58d535757631f08.zip chromium_src-081d3e316f6dd3511037dd06b58d535757631f08.tar.gz chromium_src-081d3e316f6dd3511037dd06b58d535757631f08.tar.bz2 |
First pass at refactoring pyautolib in preparation for removing proxy dependencies.
BUG=132789
TEST=functional/apptest.py, functional/browser.py, functional/navigation.py
Review URL: https://chromiumcodereview.appspot.com/10534163
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/testing_automation_provider.h')
-rw-r--r-- | chrome/browser/automation/testing_automation_provider.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h index a723303..e916897 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_; |