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

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: 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
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..8c80b972df18a6f9817cad6c2797ac0d3df4331c 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:
+ //
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
virtual void OnChannelError() OVERRIDE;
@@ -247,9 +248,16 @@ class TestingAutomationProvider : public AutomationProvider,
// Generic pattern for pyautolib
// Uses the JSON interface for input/output.
- void SendJSONRequest(int handle,
+ void SendJSONRequestWithHandle(int handle,
+ const std::string& json_request,
+ IPC::Message* reply_message);
+ void SendJSONRequestWithIndex(int index,
+ const std::string& json_request,
+ IPC::Message* reply_message);
+ void SendJSONRequest(Browser* browser,
const std::string& json_request,
- IPC::Message* reply_message);
+ IPC::Message* reply_message,
+ bool browser_provided);
// Method ptr for json handlers.
// Uses the JSON interface for input/output.
@@ -263,6 +271,15 @@ class TestingAutomationProvider : public AutomationProvider,
base::DictionaryValue*,
IPC::Message*);
+ // JSON interface helper functions.
+ static DictionaryValue* ParseJSONRequestCommand(
+ const std::string& json_request,
+ std::string* command,
+ std::string* error);
+ static void BuildJSONHandlerMaps(
+ std::map<std::string, JsonHandler>* handler_map,
+ std::map<std::string, BrowserJsonHandler>* browser_handler_map);
+
// Set window dimensions.
// Uses the JSON interface for input/output.
void SetWindowDimensions(Browser* browser,

Powered by Google App Engine
This is Rietveld 408576698