Chromium Code Reviews| 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 dcb77a92bb77a408ed810d4415bb8cca66028ad7..aace2edf836e3477e0b4fc0391f97f73b542417b 100644 |
| --- a/chrome/browser/automation/testing_automation_provider.h |
| +++ b/chrome/browser/automation/testing_automation_provider.h |
| @@ -64,6 +64,7 @@ class TestingAutomationProvider : public AutomationProvider, |
| virtual IPC::Channel::Mode GetChannelMode(bool use_named_interface); |
| // IPC::Channel::Listener: |
| + // |
|
kkania
2012/06/18 16:30:33
?
craigdh
2012/06/19 00:19:35
Good question.
|
| virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| virtual void OnChannelError() OVERRIDE; |
| @@ -247,7 +248,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); |
| @@ -263,6 +270,13 @@ class TestingAutomationProvider : public AutomationProvider, |
| base::DictionaryValue*, |
| IPC::Message*); |
| + // JSON interface helper functions. |
| + static DictionaryValue* ParseJSONRequestCommand( |
|
kkania
2012/06/18 16:30:33
i think static funcs are supposed to go above non-
craigdh
2012/06/19 00:19:35
I went and looked it up: the style guide only trea
|
| + 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, |
| @@ -1544,6 +1558,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_; |