diff options
author | craigdh@chromium.org <craigdh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-14 01:08:58 +0000 |
---|---|---|
committer | craigdh@chromium.org <craigdh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-14 01:08:58 +0000 |
commit | 16a517a6ecce784f00c6c014fd68c003509b39db (patch) | |
tree | 3214ae01f9c8d42071479c68ed67bb6e97178b83 /chrome/browser/automation/testing_automation_provider.h | |
parent | 679087a303ae1203b471a1ab8984c720ef32de48 (diff) | |
download | chromium_src-16a517a6ecce784f00c6c014fd68c003509b39db.zip chromium_src-16a517a6ecce784f00c6c014fd68c003509b39db.tar.gz chromium_src-16a517a6ecce784f00c6c014fd68c003509b39db.tar.bz2 |
Convert PyAuto's ApplyAccelerator, RunCommand, and IsMenuCommandEnabled to the JSON automation interface.
BUG=132794
TEST=functional/shortcuts.py, functional/policy.py policy.PolicyTest.testJavascriptPolicies
Review URL: https://chromiumcodereview.appspot.com/10758023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146698 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 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h index 2081705..3f374ee 100644 --- a/chrome/browser/automation/testing_automation_provider.h +++ b/chrome/browser/automation/testing_automation_provider.h @@ -848,6 +848,33 @@ class TestingAutomationProvider : public AutomationProvider, void GetIndicesFromTab(base::DictionaryValue* args, IPC::Message* reply_message); + // Executes a browser command on the given browser window. Does not wait for + // the command to complete. + // Example: + // input: { "accelerator": 1, + // "windex": 1 + // } + void ExecuteBrowserCommandAsyncJSON(DictionaryValue* args, + IPC::Message* reply_message); + + // Executes a browser command on the given browser window. Waits for the + // command to complete before returning. + // Example: + // input: { "accelerator": 1, + // "windex": 1 + // } + void ExecuteBrowserCommandJSON(DictionaryValue* args, + IPC::Message* reply_message); + + // Checks if a browser command is enabled on the given browser window. + // Example: + // input: { "accelerator": 1, + // "windex": 1 + // } + // output: { "enabled": true } + void IsMenuCommandEnabledJSON(DictionaryValue* args, + IPC::Message* reply_message); + // Navigates to the given URL. Uses the JSON interface. // The pair |windex| and |tab_index| or the single |auto_id| must be given // to specify the tab. @@ -1602,6 +1629,10 @@ class TestingAutomationProvider : public AutomationProvider, // is added to avoid overhead when not needed. scoped_ptr<AutomationEventQueue> automation_event_queue_; + // List of commands which just finish synchronously and don't require + // setting up an observer. + static const int kSynchronousCommands[]; + DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); }; |