diff options
author | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-29 17:56:47 +0000 |
---|---|---|
committer | nirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-29 17:56:47 +0000 |
commit | 24e2b10503e5f54ce5b4beb96a6403c3a8e7e62f (patch) | |
tree | 5759741f0a93469592cf61eb21ea30000e0ec867 /chrome/browser/automation/automation_provider.h | |
parent | af21820522ebcf2c3752316ee4e6c0424c1bb990 (diff) | |
download | chromium_src-24e2b10503e5f54ce5b4beb96a6403c3a8e7e62f.zip chromium_src-24e2b10503e5f54ce5b4beb96a6403c3a8e7e62f.tar.gz chromium_src-24e2b10503e5f54ce5b4beb96a6403c3a8e7e62f.tar.bz2 |
Add automation hooks for setting/gettting preferences.
Add a test which excercises this, update old test.
Also,
- Remove some old prefs hooks. They were not easy to use and required the user to know what a preference type was, with no way of listing them out.
- replace if-else statements for json handlers with a map.
- Fix json error strings. json prefers " over ' (automation_provider.cc)
BUG=42701
TEST=python chrome/test/functional/prefs.py
Review URL: http://codereview.chromium.org/1712019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45956 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_provider.h')
-rw-r--r-- | chrome/browser/automation/automation_provider.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index d21456d..518eb8b 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -349,11 +349,23 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, // Uses the JSON interface for input/output. void GetHistoryInfo(DictionaryValue* args, IPC::Message* reply_message); + // Get info about preferences. + // Uses the JSON interface for input/output. + void GetPrefsInfo(DictionaryValue* args, IPC::Message* reply_message); + + // Set prefs. + // Uses the JSON interface for input/output. + void SetPrefs(DictionaryValue* args, IPC::Message* reply_message); + // Generic pattern for pyautolib void SendJSONRequest(int handle, std::string json_request, IPC::Message* reply_message); + // Method ptr for json handlers. + typedef void (AutomationProvider::*JsonHandler)(DictionaryValue*, + IPC::Message*); + // Responds to InspectElement request void HandleInspectElementRequest(int handle, int x, |